Compare commits

..

96 Commits

Author SHA1 Message Date
wukko c0b9568b65 revision: bump to 2 (#919) 2026-02-16 21:21:37 +00:00
wukko 941352d902 helium/ui/vertical: tab indicator reposition & minor fixes (#918) 2026-02-17 03:11:50 +06:00
wukko 4cf9165668 helium/ui/vertical: fix top & bottom gaps
fixes perceived bottom margin to new tab button & between top actions in collapsed state. now tabs, buttons, and new tab button have visually the same margin.
2026-02-17 03:07:53 +06:00
wukko 4963889d71 helium/ui/vertical/bottom: fix disabled state text color
previously the text color would change on window unfocus
2026-02-17 03:05:41 +06:00
wukko 01a6615e60 helium/ui/vertical/tab: show indicator before title
fixes jiggle on hover
2026-02-17 03:04:55 +06:00
wukko a6994c688e helium/ui/vertical: draw a rounded corner on top of contents (#912)
instead of rounding the contents which causes a hole on linux & windows
2026-02-16 23:36:28 +06:00
wukko 23908b348c helium/ui: remove all layout separators, not just the top one (#908) 2026-02-16 14:30:03 +00:00
jj 1a3f947eb8 utils/name-substitution: replace fake async with process pool (#909)
before: real 0m46.312s
after: real 0m14.080s
2026-02-16 13:02:46 +01:00
wukko 9aed4b3a85 helium/ui: disable ink ripple effect on all platforms & webui (#907) 2026-02-16 17:59:40 +06:00
wukko 024340269c update: helium 0.9.1 (#860)
chromium m145, vertical tabs and layout switching (#864),
other minor improvements

Co-authored-by: jj <log@riseup.net>
2026-02-15 18:01:57 +06:00
wukko b662c376d1 revision: reset to 1 2026-02-15 17:52:39 +06:00
wukko 13e5ba2196 helium/ui/layout/settings: use enum instead of magic numbers 2026-02-15 17:52:28 +06:00
wukko df2f950984 patches: refresh for chromium 145.0.7632.75 2026-02-15 17:29:39 +06:00
wukko 838688ad33 merge: update to ungoogled-chromium 145.0.7632.75 2026-02-15 17:23:04 +06:00
jj 3b6fd05352 utils/namesub: ignore known-useless directories (#886)
before: real 1m6.983s, user 1m6.178s sys 0m0.783s
after: real 0m46.058s, user 0m45.383s, sys 0m0.650s
2026-02-15 17:18:13 +06:00
wukko 5642bceece helium/ui: vertical tabs, layout switching, unflag compact layout (#864) 2026-02-15 17:14:42 +06:00
wukko 8d2c72bdda helium/ui: fix pwa toolbar height on macos 2026-02-15 16:56:33 +06:00
jj ef21369a09 upstream-fixes/vertical: remove test hunks from backports 2026-02-15 10:47:32 +00:00
jj 09de5cf3fd upstream-fixes/vertical: backport disabling split view for tab groups 2026-02-15 10:27:35 +00:00
wukko 35b5c49350 helium/ui/vertical: fix top container button padding
fixes unexpected 1px "border" around the button
2026-02-15 16:01:44 +06:00
wukko 7fc527c933 upstream-fixes/vertical: don't reset inexistent tab strip
prevents a crash when vertical collapse state changes
2026-02-15 14:55:43 +06:00
wukko 9e55d51f84 upstream-fixes/vertical: keep vertical drag alive across capture handoff 2026-02-15 14:55:13 +06:00
jj 378ebe1d22 patches/upstream-fixes: re-backport reland of lazily-load-tabstrip
also add r1573180, which lazily-load-tabstrips depends on
2026-02-14 21:38:36 +00:00
wukko 18fb49be09 helium/ui/layout: don't use magical numbers & refactor 2026-02-14 22:55:03 +06:00
wukko 02af40f670 helium/ui/layout: update vertical option to say "experimental"
not even beta yet imo
2026-02-14 04:38:49 +06:00
wukko 36ec10ebbc helium/ui: fix GetTabStripHeight() in browser view with vertical tabs
fixes window controls position on macos
2026-02-14 04:38:09 +06:00
wukko 13390812d1 upstream-fixes: backport & optimize more vertical tabs functionality
- patches were manually optimized for m145, lots of hours lost here.
- all tabs are now properly draggable and all crashes have been eliminated.
- previously backported patches were revised & renamed for consistency.
- all of this will go away with m146 (hopefully?).

Co-authored-by: dumbmoron <log@riseup.net>
2026-02-14 04:01:23 +06:00
Blaise 230b8485a4 Update to Chromium 145.0.7632.75 2026-02-13 15:05:44 -06:00
wukko 63caeac89d helium/ui/layout: rename traditional layout to "Classic"
sounds more classy
2026-02-12 00:25:26 +06:00
wukko bdffe08340 helium/ui/vertical: fix alignment of top buttons in collapsed state
also fix the top button insets & remove unused projects button
2026-02-12 00:15:46 +06:00
wukko 22a84c5105 helium/ui/vertical: round the leading top corner 2026-02-11 22:22:11 +06:00
wukko bdd66ca1c0 helium/ui/vertical: notify layout on exclusion width change
prevents stuck window controls gaps in fullscreen on macos
2026-02-11 17:26:47 +06:00
wukko 941e0a2ac1 helium/ui/vertical: don't push uncollapsed top container to second row 2026-02-11 17:24:53 +06:00
wukko dcfeb0daa9 helium/ui/vertical: tinted colors & smaller icon for new tab button 2026-02-11 17:07:04 +06:00
wukko d081925071 helium/ui/layout/compact: fix dangling tab strip pointer
it became dangling on parent destruction, which triggered a check & caused a crash on linux during window closure
2026-02-11 16:01:45 +06:00
wukko 8a9652acd5 upstream-fixes: backport a bunch of vertical tabs CLs
mostly stability improvements to prevent crashing
2026-02-11 02:11:49 +06:00
wukko 0440e3a923 helium/ui/layout: add ui layout options to main browser context menu 2026-02-09 21:57:37 +06:00
wukko cb05352645 helium/ui/layout: create a settings entry for managing browser layout 2026-02-09 21:57:37 +06:00
wukko bd375e6c4f helium/ui: unflag compact layout & create a layout state controller
Also replaced the helium-cat-fixed-address-bar flag with helium-compact-location-width.
The fixed width is more comfortable to use, so it's now default.
2026-02-09 21:57:37 +06:00
wukko 51ef564b48 helium/ui/location-bar: always hide the icon text
the text will only be shown on security (no ssl) warnings

moved from the compact layout patch
2026-02-09 21:57:32 +06:00
wukko da2d921f8f helium/ui/omnibox: increase min characters in main patch
moved from compact layout patch
2026-02-09 17:44:22 +06:00
wukko d868911b55 helium/ui: initial vertical tabs layout 2026-02-06 17:42:37 +06:00
wukko 6594e9f332 helium/ui: LayoutInset for full toolbar margin, rename compact UI patch 2026-02-06 17:38:06 +06:00
jj 80ad3fc0c6 helium/extstore-fixups: expect Google prefix for chrome (#863)
"Chrome" is translated as "Google Chrome" in some locales, so we need to
replace the whole thing with Helium if that happens
2026-02-06 10:26:35 +00:00
wukko 0776559aef patches: refresh for chromium 145.0.7632.45 2026-02-06 02:39:27 +06:00
wukko 0691459d2c merge: update to ungoogled-chromium 145.0.7632.45 2026-02-05 15:51:35 +06:00
Blaise ae9fe23a5f Update to Chromium 145.0.7632.45 2026-02-04 16:17:58 -06:00
jj aacb18d4fd revision: bump to 5 (#859) 2026-02-04 20:56:56 +01:00
wukko b6378d5d93 merge: update to chromium 144.0.7559.132 (#856) 2026-02-05 01:34:12 +06:00
jj 9377353176 cirrus: unpack deps even if not using tarball 2026-02-04 19:00:04 +00:00
wukko 695726d37a patches: refresh for 144.0.7559.132 2026-02-04 11:43:46 +06:00
wukko bb19cfa083 merge: update to ungoogled-chromium 144.0.7559.132 2026-02-04 10:59:31 +06:00
Blaise 7607c88d3f Update to Chromium 144.0.7559.132 2026-02-03 14:20:17 -06:00
jj af7ab99ba4 helium/onboarding: remove HasPrefPath() exception (#846)
this check was mostly intended to not break services access for
pre-onboarding users. onboarding was introduced a long time ago (way
before pre-0.0.1), so this is not a real concern anymore.

it was still possible to make ShouldAccessServices() return `true` by
toggling services.enabled off and on in onboarding; this change should
make it so that it's not possible anymore (meaning the user has to
navigate to the next step before services are truly enabled).
2026-02-02 12:07:29 +06:00
wukko 298971df7f helium/core/onboarding-page: bump grd id allocation (#845) 2026-02-01 17:56:49 +01:00
jj ead83f7e78 merge: introduce onboarding get/install extension APIs (#842)
type EnablementMap = Record<ExtensionId, boolean>
Event `extension-state-changed` -> EnablementMap
and method `getExtensions()` -> Promise<EnablementMap>
- indicates whether the extension is enabled or not.

Method `installExtension(id: string)` -> Promise<void>
- enables or installs an extension (with user prompt)
- if unsuccessful, throws { code: number, error: string }
  where `code` is extensions::webstore_install::Result

also:
- ran clang-format on most of the patch
- removed NTP background color stuff since it's not used
- cleaned up unneeded includes in both .h and .cc files
2026-02-01 12:38:34 +01:00
jj 3e78654f40 helium/onboarding: remove UseStringsJs(), comment trusted-types
we don't use strings.js (yet?) so we can safely disable it.
also add a comment explaining why we disable `trusted-types`.
2026-02-01 11:01:18 +00:00
jj cd196d63c7 helium/onboarding: introduce get/install extension APIs
type EnablementMap = Record<ExtensionId, boolean>
Event `extension-state-changed` -> EnablementMap
and method `getExtensions()` -> Promise<EnablementMap>
- indicates whether the extension is enabled or not.

Method `installExtension(id: string)` -> Promise<void>
- enables or installs an extension (with user prompt)
- if unsuccessful, throws { code: number, error: string }
  where `code` is extensions::webstore_install::Result

also:
- ran clang-format on most of the patch
- removed NTP background color stuff since it's not used
- cleaned up unneeded includes in both .h and .cc files
2026-02-01 11:01:15 +00:00
jj 6f43432519 helium/onboarding: make whole services button be clickable (#841)
the <a> made it so that it does something only when text was clicked
2026-02-01 12:00:18 +01:00
Spikers d20aad643e Disable Federated Credential Management (FedCM) by default (#3625) 2026-01-28 21:04:09 -06:00
wukko 985688b9a9 revision: bump to 4 (#834) 2026-01-28 20:05:28 +00:00
jj 50167df4d4 deps: use helium ublock fork, update to 1.69.0-2 2026-01-28 19:56:05 +00:00
Daniel Richard G. 8e4b1b1204 Add quilt(1) backup option to make_domsub_script.py
This allows files modified by the script to be backed up using quilt's
convention for saving a copy of files prior to patching them. The
backup is recorded as a virtual patch file, that can then be popped
off the stack (using "quilt pop -f") like any other patch.
2026-01-28 20:21:43 +01:00
jj 24c34d93f7 utils/extraction: add support for .zip relative path stripping 2026-01-28 15:17:21 +00:00
wukko e00d3ef9e3 merge: update to chromium 144.0.7559.109 (#831) 2026-01-28 21:07:15 +06:00
wukko 6325cb4b30 patches: refresh for 144.0.7559.109 2026-01-28 16:41:01 +06:00
wukko 84dbbf159c merge: update to ungoogled-chromium 144.0.7559.109 2026-01-28 13:02:02 +06:00
Blaise d006f5961a Update to Chromium 144.0.7559.109 2026-01-27 21:42:07 -06:00
PF4Public 1031fdae23 Update copyright year in LICENSE file (#3627) 2026-01-27 21:34:12 -06:00
wukko 6a97b1949d patches: remove bromite's canvas noise patch (#825)
superseded by helium noise
2026-01-26 15:38:41 +00:00
wukko efd166b84f helium/ui/location-bar: shrink page action and fix its colors (#824)
disabled tonal coloring, forced the minimized state, and removed
leftover code from intent chip -> page action migration in M144
2026-01-26 15:34:52 +00:00
wukko 8d8052b9d5 helium/core/search: use default search icon in omnibox (#823)
reduces visual noise and prevents ugly search engine favicons from
breaking the visual uniformity and contrast. there's enough indication
to tell what search engine you're using without the favicon.
2026-01-26 15:30:54 +00:00
wukko cbcffd188c helium/core/component-updates: allow WidevineCdm installer (#822)
this allows for the widevine component to be sideloaded on some
platforms
2026-01-26 15:20:31 +00:00
wukko b1c7c7ec55 helium/core/search: break default search engine favicons (#821)
prevents unnecessary favicon requests when opening the search engines
page in settings. we use our own offline assets on that page, so this
has no visual impact.
2026-01-26 21:15:37 +06:00
wukko 53d84da528 helium/ui/pdf-viewer: adaptive sidenav width (#815)
fixes awkwardly narrow navigation view
2026-01-25 13:12:14 +00:00
jj effc1998db helium/ublock: remove migration logic from webstore uBlock (#810)
we introduced component-based uB0 in 0.4.8, and so had to migrate any
existing prefs from the webstore extension to our component-based
extension

4 milestones and 4 months later, I think we can safely drop this logic,
since the vast majority of users should have their preferences already
migrated
2026-01-25 11:10:48 +01:00
jj a59d037abf github/templates: specify issue prerequisite for PRs (#802) 2026-01-23 12:06:08 +00:00
wukko 99df2f5ce0 helium/ui/toolbar: don't show split controls if not pinned (#801)
i assume this button is shown in chromium because there's no clear
indication of what tab is focused, but helium shows it directly in the
tab strip (#800). if the user wants the toolbar button for split
controls to be visible, it can be pinned, and it'll behave just like it
used to.
2026-01-23 12:02:37 +00:00
wukko 43a4670139 helium/ui/tabs: improve split tabs ux (#800)
- show a selection stroke around the currently selected half
- allow tabs to be clicked & focused individually
- space out tabs for cleaner visuals
2026-01-23 11:58:20 +00:00
wukko 9fa95f14d5 helium/core/shortcuts: add "new split view" to mac app menu (#799)
surfaces the existing keyboard shortcut in a familiar place
2026-01-23 11:46:51 +00:00
jj 1fffbef8d8 helium/ui: hide live caption button in PiP (#787)
Fixes #272
2026-01-23 17:31:28 +06:00
wukko d69044982f helium/ui/cat: fix extra margin between window controls & toolbar (#795) 2026-01-23 12:45:32 +06:00
wukko a8f0ed3382 revision: bump to 3 (#792) 2026-01-21 15:19:40 +00:00
wukko 4c8f19152a update: chromium 144.0.7559.96 (#788) 2026-01-21 21:13:02 +06:00
wukko fd840637d0 patches: refresh for chromium 144.0.7559.96 2026-01-21 14:00:22 +06:00
wukko fab928a47d merge: update to ungoogled-chromium 144.0.7559.96 2026-01-21 13:04:38 +06:00
Blaise 4ab4dc360d Update to Chromium 144.0.7559.96 2026-01-20 17:05:22 -06:00
jj 2faa7811ca helium/bangs: only replace user_text if the result is longer (#786)
The intent of this `if` is to allow the user to select a suggested query
from bang history, but it previously always overwrote |user_text_| even
if it was longer (which is not possible if the user is selecting a
suggestion, as it will always be longer than currently-typed text).

Because |fill_into_edit| is trimmed, it also removed the trailing space
that is desired if the user was inputting a completely new query.

Make it so that |user_text_| is only replaced if it will result in an
expansion.

Fixes #726
2026-01-20 19:28:49 +00:00
jj 3e38464b94 helium/bangs: remove strict match check in MaybeStripKeyword (#785)
i can't remember what this was added for, and bangs seem to be working
fine even without it. so let's just yank it out since it seems to be
causing problems.

Fixes #146
Fixes #784
2026-01-20 19:43:24 +01:00
wukko d842e99049 helium/ui: fix caption button bounds on macos (#779)
also removed a patch for old layout which is no longer used
2026-01-20 14:06:21 +00:00
jj 894352c8d5 helium/core: don't expose mv3-only features to ublock component (#778)
fixes #677
2026-01-19 15:59:50 +00:00
wukko e88afce78d helium/core/exclude-flags: exclude new layout kill switches (#777)
related: #776 

we don't patch the old layout, so disabling the new one could have
unpredicted consequences
2026-01-19 15:56:20 +00:00
wukko 3777d75236 helium/ui: remove patches for the old browser layout (#776)
it's no longer used (as of 144) and was removed in upstream's main.
patching dead code makes no sense.
2026-01-19 21:52:17 +06:00
jj a3d44e6cc1 helium/core: add component to remove webstore nags (#772)
this component can be also used later for compatibility fixes with
alternative extension stores like opera/edge store

fixes #551
2026-01-19 12:18:35 +06:00
jj 55438d5cbc helium/settings: add "add search engine" button (#769) 2026-01-18 14:52:07 +01:00
jj 1135b4aa89 helium/ui: fix zoom and pwa action behavior (#771)
should work as expected once again
2026-01-18 10:52:38 +00:00
243 changed files with 14762 additions and 3031 deletions
+2 -3
View File
@@ -48,10 +48,9 @@ validate_with_source_task:
wait
unpack_source_script: |
if [ ! -d chromium_src ]; then
for file in downloads deps; do
./utils/downloads.py unpack -i $file.ini -c chromium_download_cache chromium_src
done
./utils/downloads.py unpack -i downloads.ini -c chromium_download_cache chromium_src
fi
./utils/downloads.py unpack -i deps.ini -c chromium_download_cache chromium_src
validate_patches_script:
- ./devutils/validate_patches.py -l chromium_src -v
validate_lists_script:
+2 -2
View File
@@ -1,7 +1,7 @@
For your pull request to not get closed without review, please confirm that:
- [ ] An issue exists where the maintainers agreed that this should be implemented.
If such issue did not exist before, I opened one.
- [ ] An issue exists where the maintainers agreed that this should be implemented
(an approved feature request, or confirmed bug).
- [ ] I tested that my contribution works locally, and does not break anything,
otherwise I have marked my PR as draft.
- [ ] If my contribution is non-trivial, I did not use AI to write most of it.
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2015-2023, The ungoogled-chromium Authors
Copyright (c) 2015-2026, The ungoogled-chromium Authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -1 +1 @@
144.0.7559.59
145.0.7632.75
+4 -3
View File
@@ -16,8 +16,9 @@ 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.67.0
url = https://github.com/imputnet/ublock-origin-crx/releases/download/%(version)s/uBlock0_%(version)s.crx
sha256 = 969eaaa4e0b1893a35e1c5767c33bcfcc62737667644c97f644ff3c84677aff7
version = 1.69.0-2
url = https://github.com/imputnet/uBlock/releases/download/%(version)s/uBlock0_%(version)s.chromium.zip
sha256 = fdc0607538082b409833acd2a80f3a2d657b2af70813a9a8e8e5c7a9938f7e29
download_filename = ublock-origin-%(version)s.zip
output_path = third_party/ublock
strip_leading_dirs = uBlock0.chromium
-1
View File
@@ -66,7 +66,6 @@ PRUNING_EXCLUDE_PATTERNS = [
'third_party/icu/android/icudtl.dat',
'third_party/icu/common/icudtb.dat',
# Exclusion for rollup v4.0+
'third_party/devtools-frontend/src/node_modules/@rollup/wasm-node/dist/wasm-node/bindings_wasm_bg.wasm',
'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',
+1 -1
View File
@@ -97,7 +97,7 @@ class _NotInRepoError(RuntimeError):
class _DepsNodeVisitor(ast.NodeVisitor):
_valid_syntax_types = (ast.mod, ast.expr_context, ast.boolop, ast.Assign, ast.Add, ast.Name,
ast.Dict, ast.Str, ast.NameConstant, ast.List, ast.BinOp)
ast.Dict, ast.Constant, ast.List, ast.BinOp)
_allowed_callables = ('Var', )
def visit_Call(self, node): #pylint: disable=invalid-name
+285 -66
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -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
@@ -42,6 +42,7 @@ chromium-metrics-reviews@google.com.
@@ -49,6 +49,7 @@ chromium-metrics-reviews@google.com.
<variant name="DBSCSessions" summary="DBSCSessions"/>
<variant name="DIPS" summary="DIPS"/>
<variant name="DownloadRecord" summary="DownloadRecord"/>
@@ -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
@@ -4318,6 +4318,9 @@ inline constexpr char kServiceWorkerToCo
@@ -4290,6 +4290,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
@@ -1151,6 +1151,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -1144,6 +1144,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
@@ -58,6 +58,7 @@
@@ -57,6 +57,7 @@
#include "chrome/browser/ui/webui/settings/about_handler.h"
#include "chrome/browser/ui/webui/settings/accessibility_main_handler.h"
#include "chrome/browser/ui/webui/settings/appearance_handler.h"
@@ -275,7 +275,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "chrome/browser/ui/webui/settings/browser_lifetime_handler.h"
#include "chrome/browser/ui/webui/settings/downloads_handler.h"
#include "chrome/browser/ui/webui/settings/font_handler.h"
@@ -211,6 +212,7 @@ void SettingsUI::RegisterProfilePrefs(
@@ -210,6 +211,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)
@@ -240,7 +242,7 @@ SettingsUI::SettingsUI(content::WebUI* w
@@ -239,7 +241,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
@@ -1014,6 +1014,8 @@ void AddImportDataStrings(content::WebUI
@@ -1025,6 +1025,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
@@ -1252,6 +1252,10 @@ static_library("ui") {
@@ -1255,6 +1255,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",
@@ -1410,6 +1414,13 @@ static_library("ui") {
@@ -1415,6 +1419,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
@@ -122,6 +122,8 @@ VisitSource VisitSourceFromInt(int value
@@ -123,6 +123,8 @@ VisitSource VisitSourceFromInt(int value
case SOURCE_SAFARI_IMPORTED:
case SOURCE_ACTOR:
case SOURCE_OS_MIGRATION_IMPORTED:
@@ -449,17 +449,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"importer/importer.cc",
--- a/chrome/utility/services.cc
+++ b/chrome/utility/services.cc
@@ -57,7 +57,9 @@
@@ -55,7 +55,9 @@
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/common/importer/profile_import.mojom.h"
+#include "chrome/common/importer/chrome_profile_import.mojom.h"
#include "chrome/utility/importer/profile_import_impl.h"
+#include "chrome/utility/importer/brave_profile_import_impl.h"
#include "components/legion/oak_session_service/oak_session_service.h" // nogncheck
#include "components/mirroring/service/mirroring_service.h"
#include "services/proxy_resolver/proxy_resolver_factory_impl.h" // nogncheck
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
@@ -138,6 +140,13 @@ static_assert(BUILDFLAG(ENABLE_PRINTING)
@@ -137,6 +139,13 @@ static_assert(BUILDFLAG(ENABLE_PRINTING)
namespace {
@@ -473,14 +473,14 @@ 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));
}
@@ -435,6 +444,7 @@ void RegisterMainThreadServices(mojo::Se
@@ -431,6 +440,7 @@ void RegisterMainThreadServices(mojo::Se
services.Add(RunPassageEmbeddingsService);
#if !BUILDFLAG(IS_ANDROID)
+ services.Add(RunBraveProfileImporter);
services.Add(RunOakSessionService);
services.Add(RunProfileImporter);
services.Add(RunMirroringService);
#endif // !BUILDFLAG(IS_ANDROID)
--- a/chrome/utility/importer/external_process_importer_bridge.h
+++ b/chrome/utility/importer/external_process_importer_bridge.h
@@ -72,7 +72,7 @@ class ExternalProcessImporterBridge : pu
@@ -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
@@ -11415,6 +11415,15 @@ Check your passwords anytime in <ph name
@@ -11478,6 +11478,15 @@ Check your passwords anytime in <ph name
Microsoft Edge
</message>
</if>
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -19,6 +19,7 @@
@@ -18,6 +18,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_agent_host.h"
@@ -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"
@@ -543,6 +544,22 @@ void ExtensionRegistrar::AddComponentExt
@@ -550,6 +551,22 @@ void ExtensionRegistrar::AddComponentExt
}
AddExtension(extension);
+13 -13
View File
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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"
@@ -3810,6 +3811,44 @@ TabStripSelectionChange TabStripModel::S
@@ -4035,6 +4036,44 @@ TabStripSelectionChange TabStripModel::S
return selection;
}
@@ -82,7 +82,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 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
@@ -619,6 +619,10 @@ class TabStripModel {
@@ -617,6 +617,10 @@ class TabStripModel {
TabStripUserGestureDetails detail = TabStripUserGestureDetails(
TabStripUserGestureDetails::GestureType::kOther));
@@ -93,7 +93,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Moves the active in the specified direction. Respects group boundaries.
void MoveTabNext();
void MoveTabPrevious();
@@ -1168,6 +1172,11 @@ class TabStripModel {
@@ -1183,6 +1187,11 @@ class TabStripModel {
kPrevious,
};
@@ -105,7 +105,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Selects either the next tab (kNext), or the previous tab (kPrevious).
void SelectRelativeTab(TabRelativeDirection direction,
TabStripUserGestureDetails detail);
@@ -1425,6 +1434,9 @@ class TabStripModel {
@@ -1462,6 +1471,9 @@ class TabStripModel {
// The focused group. If no group is focused, this is nullopt.
std::optional<tab_groups::TabGroupId> focused_group_;
@@ -117,7 +117,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -297,7 +297,10 @@
@@ -303,7 +303,10 @@
#include "ui/compositor/paint_recorder.h"
#include "ui/content_accelerators/accelerator_util.h"
#include "ui/display/screen.h"
@@ -128,7 +128,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ui/gfx/animation/animation_runner.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
@@ -315,6 +318,7 @@
@@ -321,6 +324,7 @@
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/webview/webview.h"
@@ -136,7 +136,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
@@ -816,6 +820,83 @@ class BrowserView::ExclusiveAccessContex
@@ -822,6 +826,83 @@ class BrowserView::ExclusiveAccessContex
base::WeakPtrFactory<ExclusiveAccessContextImpl> weak_ptr_factory_{this};
};
@@ -222,15 +222,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
explicit AccessibilityModeObserver(BrowserView* browser_view)
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -82,6 +82,7 @@ class LocationBarView;
class MultiContentsView;
@@ -85,6 +85,7 @@ class MultiContentsView;
class ProjectsPanelView;
class ScrimView;
class SidePanel;
+class TabCyclingEventHandler;
class TabDragDelegate;
class TabDragTarget;
class TabSearchBubbleHost;
class TabStrip;
@@ -560,6 +561,10 @@ class BrowserView : public BrowserWindow
@@ -583,6 +584,10 @@ class BrowserView : public BrowserWindow
bool IsBorderlessModeEnabled() const override;
void ShowChromeLabs() override;
BrowserView* AsBrowserView() override;
@@ -241,7 +241,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
SharingDialog* ShowSharingDialog(content::WebContents* contents,
SharingDialogData data) override;
void ShowUpdateChromeDialog() override;
@@ -868,6 +873,7 @@ class BrowserView : public BrowserWindow
@@ -884,6 +889,7 @@ class BrowserView : public BrowserWindow
friend class BrowserViewLayoutDelegateImpl;
friend class BrowserViewLayoutDelegateImplOld;
friend class BrowserViewLayoutDelegateImplBrowsertest;
@@ -249,7 +249,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
friend class TopControlsSlideControllerTest;
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, AccessibleWindowTitle);
@@ -1434,6 +1440,8 @@ class BrowserView : public BrowserWindow
@@ -1451,6 +1457,8 @@ class BrowserView : public BrowserWindow
TabStripAndWebAppViewsReparentedState::kMaxValue>
tab_strip_web_apps_reparented_state_;
@@ -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
@@ -61,7 +61,7 @@ public abstract class ChromeFeatureList
@@ -62,7 +62,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
}
/**
@@ -73,8 +73,7 @@ public abstract class ChromeFeatureList
@@ -74,8 +74,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
}
/**
@@ -86,8 +85,7 @@ public abstract class ChromeFeatureList
@@ -87,8 +86,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
}
/**
@@ -99,8 +97,7 @@ public abstract class ChromeFeatureList
@@ -100,8 +98,7 @@ public abstract class ChromeFeatureList
*/
public static double getFieldTrialParamByFeatureAsDouble(
String featureName, String paramName, double defaultValue) {
@@ -9,7 +9,7 @@
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2583,6 +2583,7 @@ static_library("browser") {
@@ -2548,6 +2548,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
@@ -191,6 +191,7 @@
@@ -187,6 +187,7 @@
#include "components/translate/core/common/translate_util.h"
#include "components/trusted_vault/features.h"
#include "components/ui_devtools/switches.h"
@@ -44,7 +44,7 @@
#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -297,6 +297,7 @@ source_set("browser") {
@@ -298,6 +298,7 @@ source_set("browser") {
"//third_party/re2",
"//third_party/snappy",
"//third_party/sqlite",
@@ -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"
@@ -3726,6 +3727,8 @@ void RenderProcessHostImpl::PropagateBro
@@ -3730,6 +3731,8 @@ void RenderProcessHostImpl::PropagateBro
switches::kEnableWebGLImageChromium,
switches::kEnableWebGPUDeveloperFeatures,
switches::kFileUrlPathAlias,
@@ -91,7 +91,7 @@
#include "ui/accessibility/accessibility_features.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/blink/blink_features.h"
@@ -485,6 +486,10 @@ void SetRuntimeFeaturesFromCommandLine(c
@@ -488,6 +489,10 @@ void SetRuntimeFeaturesFromCommandLine(c
true},
{wrf::EnableWebAudioBypassOutputBufferingOptOut,
blink::switches::kWebAudioBypassOutputBufferingOptOut, true},
@@ -116,7 +116,7 @@
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -41,6 +41,7 @@
@@ -40,6 +40,7 @@
#include "base/i18n/time_formatting.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
@@ -124,7 +124,7 @@
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
@@ -1093,6 +1094,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();
@@ -1226,6 +1232,14 @@ const Position Document::PositionAdjuste
@@ -1222,6 +1228,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
@@ -597,6 +597,10 @@ class CORE_EXPORT Document : public Cont
@@ -570,6 +570,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;
@@ -3055,6 +3059,9 @@ class CORE_EXPORT Document : public Cont
@@ -2821,6 +2825,9 @@ class CORE_EXPORT Document : public Cont
base::ElapsedTimer start_time_;
@@ -176,7 +176,7 @@
// - ScriptSchedulingType::kInOrder
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -3257,6 +3257,9 @@ Vector<gfx::RectF> Element::GetClientRec
@@ -3440,6 +3440,9 @@ Vector<gfx::RectF> Element::GetClientRec
}
Vector<gfx::RectF> result;
for (auto& quad : quads) {
@@ -186,7 +186,7 @@
result.emplace_back(quad.BoundingBox());
}
return result;
@@ -3286,6 +3289,9 @@ gfx::RectF Element::GetBoundingClientRec
@@ -3469,6 +3472,9 @@ gfx::RectF Element::GetBoundingClientRec
DCHECK(element_layout_object);
GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
*element_layout_object);
@@ -198,7 +198,7 @@
--- a/third_party/blink/renderer/core/dom/range.cc
+++ b/third_party/blink/renderer/core/dom/range.cc
@@ -1654,6 +1654,12 @@ DOMRectList* Range::getClientRects() con
@@ -1656,6 +1656,12 @@ DOMRectList* Range::getClientRects() con
Vector<gfx::QuadF> quads;
GetBorderAndTextQuads(quads);
@@ -211,7 +211,7 @@
return MakeGarbageCollected<DOMRectList>(quads);
}
@@ -1661,7 +1667,11 @@ DOMRect* Range::getBoundingClientRect()
@@ -1663,7 +1669,11 @@ DOMRect* Range::getBoundingClientRect()
// TODO(crbug.com/1499981): This should be removed once synchronized scrolling
// impact is understood.
SyncScrollAttemptHeuristic::DidAccessScrollOffset();
@@ -226,7 +226,7 @@
// 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
@@ -89,6 +89,24 @@ TextMetrics::TextMetrics(const Font* fon
@@ -90,6 +90,24 @@ TextMetrics::TextMetrics(const Font* fon
Update(font, direction, baseline, align, text, text_painter);
}
@@ -253,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
@@ -109,6 +109,8 @@ class CORE_EXPORT TextMetrics final : pu
@@ -110,6 +110,8 @@ class CORE_EXPORT TextMetrics final : pu
float x_position_;
};
@@ -274,7 +274,7 @@
namespace blink {
class MemoryManagedPaintCanvas;
@@ -1170,9 +1173,22 @@ TextMetrics* BaseRenderingContext2D::mea
@@ -1171,9 +1174,22 @@ TextMetrics* BaseRenderingContext2D::mea
TextDirection direction =
ToTextDirection(state.GetDirection(), host, computed_style);
@@ -300,7 +300,7 @@
String BaseRenderingContext2D::lang() const {
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1810,6 +1810,7 @@ component("platform") {
@@ -1809,6 +1809,7 @@ component("platform") {
"//components/paint_preview/common",
"//components/search_engines:search_engine_utils",
"//components/translate/core/language_detection",
@@ -310,7 +310,7 @@
"//components/webrtc:net_address_utils",
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -73,4 +73,12 @@ void WebRuntimeFeatures::EnableLocalNetw
@@ -72,4 +72,12 @@ void WebRuntimeFeatures::EnableLocalNetw
RuntimeEnabledFeatures::SetLocalNetworkAccessWebRTCEnabled(enable);
}
@@ -335,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
@@ -2511,6 +2511,12 @@
@@ -2541,6 +2541,12 @@
status: "stable",
},
{
@@ -1,326 +0,0 @@
# NOTE: Changes made:
# * Added flag --fingerprinting-canvas-image-data-noise to enable/disable
# Canvas image data fingerprinting deception
# * Removed WebGLDebugRendererInfo disabling in favor of an alternative
# implementation in ungoogled-chromium/disable-webgl-renderer-info.patch
# * Tweak subchannel noise generation to require fewer random number generation
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sat, 24 Mar 2018 05:18:03 +0100
Subject: Canvas: fingerprinting mitigations for image data and webGL
Disable webGL renderer info and modify the color data returned by ToBlob,
ToDataURL and getImageData so that it will contain randomly manipulated
pixels (maximum 10) that slightly change the color of the R,G,B components
without a visible effect.
Credits to Slaviro (https://github.com/Slaviro) for coming up with a better
approach to change color components.
---
.../platform/graphics/image_data_buffer.cc | 5 +
.../platform/graphics/static_bitmap_image.cc | 154 +++++++++++++++++++++
.../platform/graphics/static_bitmap_image.h | 2 +
4 files changed, 163 insertions(+), 2 deletions(-)
--- a/chrome/browser/bromite_flag_entries.h
+++ b/chrome/browser/bromite_flag_entries.h
@@ -16,4 +16,8 @@
flag_descriptions::kMaxConnectionsPerHostName,
flag_descriptions::kMaxConnectionsPerHostDescription,
kOsAll, MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)},
+ {"fingerprinting-canvas-image-data-noise",
+ "Enable Canvas image data fingerprint deception",
+ "Slightly modifies at most 10 pixels in Canvas image data extracted via JS APIs. ungoogled-chromium flag, Bromite feature.",
+ kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)},
#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
@@ -3729,6 +3729,7 @@ void RenderProcessHostImpl::PropagateBro
switches::kFileUrlPathAlias,
switches::kFingerprintingClientRectsNoise,
switches::kFingerprintingCanvasMeasureTextNoise,
+ switches::kFingerprintingCanvasImageDataNoise,
switches::kForceDeviceScaleFactor,
switches::kForceDisplayColorProfile,
switches::kForceHighContrast,
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -490,6 +490,8 @@ void SetRuntimeFeaturesFromCommandLine(c
switches::kFingerprintingClientRectsNoise, true},
{wrf::EnableFingerprintingCanvasMeasureTextNoise,
switches::kFingerprintingCanvasMeasureTextNoise, true},
+ {wrf::EnableFingerprintingCanvasImageDataNoise,
+ switches::kFingerprintingCanvasImageDataNoise, true},
};
for (const auto& mapping : switchToFeatureMapping) {
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -73,6 +73,7 @@ class BLINK_PLATFORM_EXPORT WebRuntimeFe
static void EnableFingerprintingClientRectsNoise(bool);
static void EnableFingerprintingCanvasMeasureTextNoise(bool);
+ static void EnableFingerprintingCanvasImageDataNoise(bool);
WebRuntimeFeatures() = delete;
};
--- 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
@@ -526,6 +526,9 @@ ImageData* BaseRenderingContext2D::getIm
snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds();
DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh)));
}
+ if (read_pixels_successful && RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
+ StaticBitmapImage::ShuffleSubchannelColorData(image_data_pixmap.addr(), image_data_pixmap.info(), sx, sy);
+ }
}
return image_data;
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1752,7 +1752,9 @@ component("platform") {
"//third_party/blink/renderer:non_test_config",
]
- include_dirs = []
+ include_dirs = [
+ "//third_party/skia/include/private", # For shuffler in graphics/static_bitmap_image.cc
+ ]
allow_circular_includes_from = [
"//third_party/blink/renderer/platform/blob",
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -81,4 +81,8 @@ void WebRuntimeFeatures::EnableFingerpri
RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable);
}
+void WebRuntimeFeatures::EnableFingerprintingCanvasImageDataNoise(bool enable) {
+ RuntimeEnabledFeatures::SetFingerprintingCanvasImageDataNoiseEnabled(enable);
+}
+
} // namespace blink
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
@@ -4,6 +4,8 @@
#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
+#include "base/rand_util.h"
+#include "base/logging.h"
#include "base/numerics/checked_math.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h"
@@ -11,11 +13,13 @@
#include "third_party/blink/renderer/platform/graphics/image_observer.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_image.h"
#include "third_party/blink/renderer/platform/graphics/unaccelerated_static_bitmap_image.h"
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/transforms/affine_transform.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkSurface.h"
+#include "third_party/skia/src/core/SkColorData.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "v8/include/v8.h"
@@ -114,4 +118,154 @@ void StaticBitmapImage::DrawHelper(cc::P
ToSkiaRectConstraint(draw_options.clamping_mode));
}
+// set the component to maximum-delta if it is >= maximum, or add to existing color component (color + delta)
+#define shuffleComponent(color, max, delta) ( (color) >= (max) ? ((max)-(delta)) : ((color)+(delta)) )
+
+#define writable_addr(T, p, stride, x, y) (T*)((const char *)p + y * stride + x * sizeof(T))
+
+void StaticBitmapImage::ShuffleSubchannelColorData(const void *addr, const SkImageInfo& info, int srcX, int srcY) {
+ auto w = info.width() - srcX, h = info.height() - srcY;
+
+ // skip tiny images; info.width()/height() can also be 0
+ if ((w < 8) || (h < 8)) {
+ return;
+ }
+
+ // generate the first random number here
+ double shuffleX = base::RandDouble();
+
+ // cap maximum pixels to change
+ auto pixels = (w + h) / 128;
+ if (pixels > 10) {
+ pixels = 10;
+ } else if (pixels < 2) {
+ pixels = 2;
+ }
+
+ auto colorType = info.colorType();
+ auto fRowBytes = info.minRowBytes(); // stride
+
+ DLOG(INFO) << "BRM: ShuffleSubchannelColorData() w=" << w << " h=" << h << " colorType=" << colorType << " fRowBytes=" << fRowBytes;
+
+ // second random number (for y/height)
+ double shuffleY = base::RandDouble();
+
+ // calculate random coordinates using bisection
+ auto currentW = w, currentH = h;
+ for(;pixels >= 0; pixels--) {
+ int x = currentW * shuffleX, y = currentH * shuffleY;
+
+ // calculate randomisation amounts for each RGB component
+ uint8_t shuffleR = base::RandInt(0, 4);
+ uint8_t shuffleG = (shuffleR + x) % 4;
+ uint8_t shuffleB = (shuffleG + y) % 4;
+
+ // manipulate pixel data to slightly change the R, G, B components
+ switch (colorType) {
+ case kAlpha_8_SkColorType:
+ {
+ auto *pixel = writable_addr(uint8_t, addr, fRowBytes, x, y);
+ auto r = SkColorGetR(*pixel), g = SkColorGetG(*pixel), b = SkColorGetB(*pixel), a = SkColorGetA(*pixel);
+
+ r = shuffleComponent(r, UINT8_MAX-1, shuffleR);
+ g = shuffleComponent(g, UINT8_MAX-1, shuffleG);
+ b = shuffleComponent(b, UINT8_MAX-1, shuffleB);
+ // alpha is left unchanged
+
+ *pixel = SkColorSetARGB(a, r, g, b);
+ }
+ break;
+ case kGray_8_SkColorType:
+ {
+ auto *pixel = writable_addr(uint8_t, addr, fRowBytes, x, y);
+ *pixel = shuffleComponent(*pixel, UINT8_MAX-1, shuffleB);
+ }
+ break;
+ case kRGB_565_SkColorType:
+ {
+ auto *pixel = writable_addr(uint16_t, addr, fRowBytes, x, y);
+ unsigned r = SkPacked16ToR32(*pixel);
+ unsigned g = SkPacked16ToG32(*pixel);
+ unsigned b = SkPacked16ToB32(*pixel);
+
+ r = shuffleComponent(r, 31, shuffleR);
+ g = shuffleComponent(g, 63, shuffleG);
+ b = shuffleComponent(b, 31, shuffleB);
+
+ unsigned r16 = (r & SK_R16_MASK) << SK_R16_SHIFT;
+ unsigned g16 = (g & SK_G16_MASK) << SK_G16_SHIFT;
+ unsigned b16 = (b & SK_B16_MASK) << SK_B16_SHIFT;
+
+ *pixel = r16 | g16 | b16;
+ }
+ break;
+ case kARGB_4444_SkColorType:
+ {
+ auto *pixel = writable_addr(uint16_t, addr, fRowBytes, x, y);
+ auto a = SkGetPackedA4444(*pixel), r = SkGetPackedR4444(*pixel), g = SkGetPackedG4444(*pixel), b = SkGetPackedB4444(*pixel);
+
+ r = shuffleComponent(r, 15, shuffleR);
+ g = shuffleComponent(g, 15, shuffleG);
+ b = shuffleComponent(b, 15, shuffleB);
+ // alpha is left unchanged
+
+ unsigned a4 = (a & 0xF) << SK_A4444_SHIFT;
+ unsigned r4 = (r & 0xF) << SK_R4444_SHIFT;
+ unsigned g4 = (g & 0xF) << SK_G4444_SHIFT;
+ unsigned b4 = (b & 0xF) << SK_B4444_SHIFT;
+
+ *pixel = r4 | b4 | g4 | a4;
+ }
+ break;
+ case kRGBA_8888_SkColorType:
+ {
+ auto *pixel = writable_addr(uint32_t, addr, fRowBytes, x, y);
+ auto a = SkGetPackedA32(*pixel), r = SkGetPackedR32(*pixel), g = SkGetPackedG32(*pixel), b = SkGetPackedB32(*pixel);
+
+ r = shuffleComponent(r, UINT8_MAX-1, shuffleR);
+ g = shuffleComponent(g, UINT8_MAX-1, shuffleG);
+ b = shuffleComponent(b, UINT8_MAX-1, shuffleB);
+ // alpha is left unchanged
+
+ *pixel = (a << SK_A32_SHIFT) | (r << SK_R32_SHIFT) |
+ (g << SK_G32_SHIFT) | (b << SK_B32_SHIFT);
+ }
+ break;
+ case kBGRA_8888_SkColorType:
+ {
+ auto *pixel = writable_addr(uint32_t, addr, fRowBytes, x, y);
+ auto a = SkGetPackedA32(*pixel), b = SkGetPackedR32(*pixel), g = SkGetPackedG32(*pixel), r = SkGetPackedB32(*pixel);
+
+ r = shuffleComponent(r, UINT8_MAX-1, shuffleR);
+ g = shuffleComponent(g, UINT8_MAX-1, shuffleG);
+ b = shuffleComponent(b, UINT8_MAX-1, shuffleB);
+ // alpha is left unchanged
+
+ *pixel = (a << SK_BGRA_A32_SHIFT) | (r << SK_BGRA_R32_SHIFT) |
+ (g << SK_BGRA_G32_SHIFT) | (b << SK_BGRA_B32_SHIFT);
+ }
+ break;
+ default:
+ // the remaining formats are not expected to be used in Chromium
+ LOG(WARNING) << "BRM: ShuffleSubchannelColorData(): Ignoring pixel format";
+ return;
+ }
+
+ // keep bisecting or reset current width/height as needed
+ if (x == 0) {
+ currentW = w;
+ } else {
+ currentW = x;
+ }
+ if (y == 0) {
+ currentH = h;
+ } else {
+ currentH = y;
+ }
+ }
+}
+
+#undef writable_addr
+#undef shuffleComponent
+
} // namespace blink
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.h
@@ -38,6 +38,8 @@ class PLATFORM_EXPORT StaticBitmapImage
StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {}
+ static void ShuffleSubchannelColorData(const void *addr, const SkImageInfo& info, int srcX, int srcY);
+
bool IsStaticBitmapImage() const override { return true; }
// Methods overridden by all sub-classes
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
@@ -13,6 +13,8 @@
#include <stdio.h> // Needed by jpeglib.h
#include "jpeglib.h" // for JPEG_MAX_DIMENSION
+#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/libwebp/src/src/webp/encode.h" // for WEBP_MAX_DIMENSION
namespace blink {
@@ -44,6 +46,10 @@ bool ImageEncoder::Encode(Vector<unsigne
const SkPixmap& src,
ImageEncodingMimeType mime_type,
double quality) {
+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
+ // shuffle subchannel color data within the pixmap
+ StaticBitmapImage::ShuffleSubchannelColorData(src.writable_addr(), src.info(), 0, 0);
+ }
switch (mime_type) {
case kMimeTypeJpeg: {
SkJpegEncoder::Options options;
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2517,6 +2517,9 @@
name: "FingerprintingCanvasMeasureTextNoise",
},
{
+ name: "FingerprintingCanvasImageDataNoise",
+ },
+ {
name: "Fledge",
status: "stable",
base_feature: "none",
@@ -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
@@ -2258,6 +2258,7 @@ static_library("browser") {
@@ -2226,6 +2226,7 @@ static_library("browser") {
"//components/net_log",
"//components/network_hints/common:mojo_bindings",
"//components/network_session_configurator/browser",
@@ -65,7 +65,7 @@ with limited CPU/memory resources and it is disabled by default.
#include "base/synchronization/waitable_event.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
@@ -115,6 +117,7 @@
@@ -116,6 +118,7 @@
#include "components/metrics/metrics_service.h"
#include "components/metrics_services_manager/metrics_services_manager.h"
#include "components/metrics_services_manager/metrics_services_manager_client.h"
@@ -73,7 +73,7 @@ with limited CPU/memory resources and it is disabled by default.
#include "components/network_time/network_time_tracker.h"
#include "components/os_crypt/async/browser/os_crypt_async.h"
#include "components/permissions/permissions_client.h"
@@ -149,6 +152,7 @@
@@ -152,6 +155,7 @@
#include "extensions/common/constants.h"
#include "media/media_buildflags.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
@@ -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"
@@ -441,6 +445,18 @@ void BrowserProcessImpl::Init() {
@@ -464,6 +468,18 @@ void BrowserProcessImpl::Init() {
pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled,
base::BindRepeating(&ApplyMetricsReportingPolicy));
@@ -102,7 +102,7 @@ with limited CPU/memory resources and it is disabled by default.
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -2759,6 +2759,10 @@ inline constexpr char kLogJsConsoleMessa
@@ -2712,6 +2712,10 @@ inline constexpr char kLogJsConsoleMessa
"Enable logging JS console messages in system logs, please note that they "
"may contain PII.";
@@ -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
@@ -176,10 +176,6 @@ void AddInfoBarsIfNecessary(BrowserWindo
@@ -180,10 +180,6 @@ void AddInfoBarsIfNecessary(BrowserWindo
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
@@ -24,7 +24,7 @@
bool ValidateExtensionLocales(const base::FilePath& extension_path,
--- a/extensions/common/extension_l10n_util.cc
+++ b/extensions/common/extension_l10n_util.cc
@@ -18,14 +18,18 @@
@@ -17,14 +17,18 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
@@ -43,7 +43,7 @@
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
@@ -38,6 +42,7 @@
@@ -37,6 +41,7 @@
#include "third_party/icu/source/common/unicode/uloc.h"
#include "third_party/zlib/google/compression_utils.h"
#include "ui/base/l10n/l10n_util.h"
@@ -51,7 +51,7 @@
namespace errors = extensions::manifest_errors;
namespace keys = extensions::manifest_keys;
@@ -114,6 +119,19 @@ std::optional<base::Value::Dict> LoadMes
@@ -113,6 +118,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,
@@ -361,13 +379,16 @@ bool LocalizeManifest(const extensions::
@@ -360,13 +378,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())
@@ -505,6 +526,42 @@ extensions::MessageBundle* LoadMessageCa
@@ -504,6 +525,42 @@ extensions::MessageBundle* LoadMessageCa
return extensions::MessageBundle::Create(catalogs, error);
}
@@ -202,7 +202,7 @@
+ std::set<std::string> chrome_locales;
+ extension_l10n_util::GetAllLocales(&chrome_locales);
+
+ if (default_locale.empty() || !base::Contains(chrome_locales, default_locale)) {
+ if (default_locale.empty() || !chrome_locales.contains(default_locale)) {
+ *error = l10n_util::GetStringUTF8(
+ IDS_EXTENSION_LOCALES_NO_DEFAULT_LOCALE_SPECIFIED);
+ return nullptr;
@@ -217,7 +217,7 @@
.Append(kVerifiedContentsFilename);
--- a/extensions/browser/renderer_startup_helper.cc
+++ b/extensions/browser/renderer_startup_helper.cc
@@ -712,6 +712,18 @@ void RendererStartupHelper::GetMessageBu
@@ -731,6 +731,18 @@ void RendererStartupHelper::GetMessageBu
paths_to_load.push_back(imported_extension->path());
}
@@ -36,7 +36,7 @@
// static
void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnFileTaskRunner(
ExtensionSet extensions,
@@ -203,14 +221,21 @@ void ManagedValueStoreCache::ExtensionTr
@@ -208,14 +226,21 @@ void ManagedValueStoreCache::ExtensionTr
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE, base::BindOnce(&ExtensionTracker::Register, self,
@@ -1,6 +1,6 @@
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1418,6 +1418,11 @@ inline constexpr char kExtensionCommands
@@ -1415,6 +1415,11 @@ inline constexpr char kExtensionCommands
inline constexpr char kPluginsAlwaysOpenPdfExternally[] =
"plugins.always_open_pdf_externally";
@@ -25,7 +25,7 @@
registry->RegisterIntegerPref(prefs::kPdfInfoBarTimesShown, 0);
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -199,6 +199,11 @@ void AddInfoBarsIfNecessary(BrowserWindo
@@ -203,6 +203,11 @@ void AddInfoBarsIfNecessary(BrowserWindo
return;
}
@@ -63,7 +63,25 @@
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
@@ -7,14 +7,17 @@
#include <memory>
#include "base/types/pass_key.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/infobars/confirm_infobar_creator.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/startup/default_browser_prompt/default_browser_prompt_prefs.h"
+#include "chrome/common/pref_names.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar.h"
#include "components/omnibox/browser/vector_icons.h"
+#include "components/prefs/pref_service.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h"
@@ -68,13 +71,15 @@ std::u16string DefaultBrowserInfoBarDele
}
int DefaultBrowserInfoBarDelegate::GetButtons() const {
@@ -82,7 +100,7 @@
}
bool DefaultBrowserInfoBarDelegate::Accept() {
@@ -156,6 +158,22 @@ bool DefaultBrowserInfoBarDelegate::Acce
@@ -86,6 +91,22 @@ bool DefaultBrowserInfoBarDelegate::Acce
return ConfirmInfoBarDelegate::Accept();
}
@@ -107,7 +125,7 @@
+}
--- 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
@@ -47,7 +47,9 @@ class DefaultBrowserInfoBarDelegate : pu
int GetButtons() const override;
std::u16string GetButtonLabel(InfoBarButton button) const override;
bool Accept() override;
@@ -31,7 +31,7 @@
#include "base/containers/to_vector.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
@@ -267,6 +268,10 @@ network::mojom::SSLConfigPtr SSLConfigSe
@@ -269,6 +270,10 @@ network::mojom::SSLConfigPtr SSLConfigSe
config->ech_enabled = ech_enabled_.GetValue();
@@ -43,7 +43,7 @@
return PRODUCT_VERSION;
--- a/chrome/browser/ui/webui/version/version_ui.cc
+++ b/chrome/browser/ui/webui/version/version_ui.cc
@@ -222,6 +222,8 @@ void VersionUI::AddVersionDetailStrings(
@@ -232,6 +232,8 @@ void VersionUI::AddVersionDetailStrings(
VersionProcessorVariation());
// Data strings.
@@ -52,7 +52,7 @@
html_source->AddString(version_ui::kVersion,
version_info::GetVersionNumber());
html_source->AddString(version_ui::kVersionSuffix,
@@ -309,12 +311,14 @@ void VersionUI::AddVersionDetailStrings(
@@ -319,12 +321,14 @@ void VersionUI::AddVersionDetailStrings(
std::u16string VersionUI::GetAnnotatedVersionStringForUi() {
return l10n_util::GetStringFUTF16(
IDS_SETTINGS_ABOUT_PAGE_BROWSER_VERSION,
@@ -162,7 +162,7 @@
background-color: var(--background-color);
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -362,16 +362,16 @@ bool HandleCreditsSwitch(const base::Com
@@ -365,16 +365,16 @@ bool HandleCreditsSwitch(const base::Com
bool HandleVersionSwitches(const base::CommandLine& command_line) {
#if !BUILDFLAG(IS_MAC)
if (command_line.HasSwitch(switches::kProductVersion)) {
@@ -22,7 +22,7 @@
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -45,6 +45,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE
@@ -44,6 +44,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCanvas);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseAudio);
@@ -51,7 +51,7 @@
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
@@ -1928,9 +1928,9 @@ void WebView::ApplyWebPreferences(const
prefs.default_maximum_page_scale_factor);
#endif
+27 -42
View File
@@ -84,7 +84,7 @@
+}
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -40,6 +40,8 @@
@@ -39,6 +39,8 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/country_codes/country_codes.h"
@@ -93,7 +93,7 @@
#include "components/google/core/common/google_util.h"
#include "components/omnibox/common/omnibox_feature_configs.h"
#include "components/omnibox/common/omnibox_features.h"
@@ -58,7 +60,9 @@
@@ -57,7 +59,9 @@
#include "components/search_engines/search_engines_switches.h"
#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url.h"
@@ -103,7 +103,7 @@
#include "components/search_engines/template_url_prepopulate_data.h"
#include "components/search_engines/template_url_prepopulate_data_resolver.h"
#include "components/search_engines/template_url_service_client.h"
@@ -73,6 +77,7 @@
@@ -72,6 +76,7 @@
#include "components/sync/protocol/search_engine_specifics.pb.h"
#include "components/url_formatter/url_fixer.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
@@ -111,7 +111,7 @@
#include "url/gurl.h"
#include "url/origin.h"
#include "url/third_party/mozilla/url_parse.h"
@@ -581,6 +586,7 @@ class TemplateURLService::PreLoadingProv
@@ -580,6 +585,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,
@@ -593,6 +599,8 @@ TemplateURLService::TemplateURLService(
@@ -592,6 +598,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>()),
@@ -609,11 +617,13 @@ TemplateURLService::TemplateURLService(
@@ -608,11 +616,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>(),
@@ -694,6 +704,10 @@ bool TemplateURLService::ShowInActivesLi
@@ -693,6 +703,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;
@@ -1527,11 +1541,37 @@ void TemplateURLService::Load() {
@@ -1526,11 +1540,37 @@ void TemplateURLService::Load() {
if (web_data_service_) {
load_handle_ = web_data_service_->GetKeywords(this);
@@ -191,7 +191,7 @@
base::CallbackListSubscription TemplateURLService::RegisterOnLoadedCallback(
base::OnceClosure callback) {
return loaded_ ? base::CallbackListSubscription()
@@ -2515,6 +2555,13 @@ void TemplateURLService::Init() {
@@ -2514,6 +2554,13 @@ void TemplateURLService::Init() {
&TemplateURLService::OnDefaultSearchProviderGUIDChanged,
base::Unretained(this)));
@@ -382,7 +382,7 @@
+}
+
+void BangManager::OnSimpleLoaderComplete(
+ std::unique_ptr<std::string> response_body) {
+ std::optional<std::string> response_body) {
+ int response_code = -1;
+ std::string mime_type;
+
@@ -545,7 +545,7 @@
+ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
+ PrefService& prefs
+ );
+ void OnSimpleLoaderComplete(std::unique_ptr<std::string> response_body);
+ void OnSimpleLoaderComplete(std::optional<std::string> response_body);
+ void LoadManifestFromString(const std::string& manifest);
+ BangCategory GetCategoryFromJSONObject(std::string_view sc) const;
+
@@ -678,7 +678,7 @@
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -1743,6 +1743,8 @@ bool TemplateURL::IsBetterThanConflictin
@@ -1759,6 +1759,8 @@ bool TemplateURL::IsBetterThanConflictin
: base::Time(),
// Prefer engines that CANNOT be auto-replaced.
!engine->safe_for_autoreplace(),
@@ -689,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
@@ -847,6 +847,8 @@ class TemplateURL {
@@ -848,6 +848,8 @@ class TemplateURL {
starter_pack_id() == template_url_starter_pack_data::kAiMode;
}
@@ -700,7 +700,7 @@
// Sanity check for https://crbug.com/781703.
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -67,6 +67,11 @@ bool ShouldAccessExtensionService(const
@@ -63,6 +63,11 @@ bool ShouldAccessExtensionService(const
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
}
@@ -724,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
@@ -2160,6 +2160,9 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2205,6 +2205,9 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
@@ -736,7 +736,7 @@
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2005,6 +2005,12 @@
@@ -2029,6 +2029,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>
@@ -751,7 +751,7 @@
</message>
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -92,6 +92,11 @@
@@ -87,6 +87,11 @@
label="$i18n{heliumExtProxyToggle}"
sub-label="$i18n{heliumExtProxyToggleDescription}">
</settings-toggle-button>
@@ -765,7 +765,7 @@
</template>
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -217,6 +217,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -215,6 +215,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterIntegerPref(prefs::kHeliumSchemaVersion, 0);
registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
@@ -775,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
@@ -364,6 +364,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -365,6 +365,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumExtProxyEnabled] =
settings_api::PrefType::kBoolean;
@@ -798,7 +798,7 @@
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/third_party/metrics_proto/omnibox_event.proto
+++ b/third_party/metrics_proto/omnibox_event.proto
@@ -786,6 +786,8 @@ message OmniboxEventProto {
@@ -787,6 +787,8 @@ message OmniboxEventProto {
// or tabbing to it.
TOOLBELT = 9; // Select and activate a search shortcuts action
// from the omnibox toolbelt.
@@ -832,7 +832,7 @@
// - youtube| -> youtube | (a space was appended to a keyword)
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -885,6 +885,24 @@ void OmniboxEditModel::OpenSelectionForT
@@ -888,6 +888,24 @@ void OmniboxEditModel::OpenSelectionForT
OpenSelection(popup_selection_, timestamp, disposition, via_keyboard);
}
@@ -857,7 +857,7 @@
void OmniboxEditModel::AcceptKeyword(
OmniboxEventProto::KeywordModeEntryMethod entry_method) {
TRACE_EVENT0("omnibox", "OmniboxEditModel::AcceptKeyword");
@@ -893,6 +911,17 @@ void OmniboxEditModel::AcceptKeyword(
@@ -896,6 +914,17 @@ void OmniboxEditModel::AcceptKeyword(
controller_->StopAutocomplete(/*clear_result=*/false);
@@ -867,7 +867,7 @@
+
+ if (turl && turl->bang_id() > 0 && !user_text_.starts_with(u'!')) {
+ AutocompleteMatch match = CurrentMatch();
+ if (!match.fill_into_edit.empty()) {
+ if (match.fill_into_edit.length() > user_text_.length()) {
+ user_text_ = match.fill_into_edit;
+ }
+ }
@@ -875,7 +875,7 @@
SetIsKeywordHint(false);
keyword_mode_entry_method_ = entry_method;
if (original_user_text_with_keyword_.empty()) {
@@ -935,9 +964,6 @@ void OmniboxEditModel::AcceptKeyword(
@@ -938,9 +967,6 @@ void OmniboxEditModel::AcceptKeyword(
}
base::RecordAction(base::UserMetricsAction("AcceptedKeywordHint"));
@@ -885,22 +885,7 @@
EmitEnteredKeywordModeHistogram(entry_method, turl, !user_text_.empty());
}
@@ -1601,7 +1627,13 @@ void OmniboxEditModel::InternalSetUserTe
std::u16string OmniboxEditModel::MaybeStripKeyword(
const std::u16string& text) const {
- return is_keyword_selected()
+ std::u16string trimmed_text;
+ base::TrimWhitespace(text, base::TRIM_LEADING, &trimmed_text);
+
+ std::u16string actual_keyword = base::ToLowerASCII(
+ AutocompleteInput::SplitKeywordFromInput(trimmed_text, false, nullptr));
+
+ return is_keyword_selected() && actual_keyword == keyword_
? AutocompleteInput::SplitReplacementStringFromInput(text, false)
: text;
}
@@ -2795,6 +2827,21 @@ bool OmniboxEditModel::AllowKeywordSpace
@@ -2804,6 +2830,21 @@ bool OmniboxEditModel::AllowKeywordSpace
return GetPrefService()->GetBoolean(omnibox::kKeywordSpaceTriggeringEnabled);
}
@@ -922,7 +907,7 @@
bool OmniboxEditModel::ShouldAcceptKeywordAfterInsertingSpaceAtEnd(
const std::u16string& new_text) {
// Check if the user has disabled space triggering.
@@ -2818,16 +2865,20 @@ bool OmniboxEditModel::ShouldAcceptKeywo
@@ -2827,16 +2868,20 @@ bool OmniboxEditModel::ShouldAcceptKeywo
return false;
}
@@ -952,7 +937,7 @@
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -1983,6 +1983,7 @@ bool OmniboxViewViews::HandleKeyEvent(vi
@@ -2015,6 +2015,7 @@ bool OmniboxViewViews::HandleKeyEvent(vi
metric_value);
if (controller()->IsPopupOpen() && !control) {
// Normal case of pressing <return> when the popup is open.
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -40,6 +40,7 @@
@@ -36,6 +36,7 @@
#include "chrome/browser/apps/app_discovery_service/app_discovery_service.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/browser_process.h"
@@ -90,7 +90,7 @@
"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
@@ -262,6 +262,8 @@ static_library("browser") {
@@ -263,6 +263,8 @@ static_library("browser") {
"browsing_topics/browsing_topics_service_factory.h",
"chained_back_navigation_tracker.cc",
"chained_back_navigation_tracker.h",
@@ -41,7 +41,7 @@
std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_) {
if (user_url_.empty()) {
return std::nullopt;
@@ -77,6 +83,11 @@ bool ShouldFetchBangs(const PrefService&
@@ -73,6 +79,11 @@ bool ShouldFetchBangs(const PrefService&
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
}
@@ -53,7 +53,7 @@
GURL GetExtensionUpdateURL(const PrefService& prefs) {
if (!ShouldAccessExtensionService(prefs)) {
return GetDummyURL();
@@ -102,6 +113,20 @@ GURL GetSpellcheckURL(const PrefService&
@@ -98,6 +109,20 @@ GURL GetSpellcheckURL(const PrefService&
return GetServicesBaseURL(prefs).Resolve("/dict/");
}
@@ -76,7 +76,7 @@
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
@@ -104,6 +104,11 @@
@@ -99,6 +99,11 @@
sub-label="$i18n{heliumSpellcheckToggleDescription}">
</settings-toggle-button>
</if>
@@ -90,7 +90,7 @@
</template>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2166,6 +2166,10 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2211,6 +2211,10 @@ void AddPrivacyStrings(content::WebUIDat
{"heliumSpellcheckToggle", IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE},
{"heliumSpellcheckToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION},
@@ -103,7 +103,7 @@
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
@@ -368,6 +368,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -369,6 +369,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumSpellcheckEnabled] =
settings_api::PrefType::kBoolean;
@@ -114,7 +114,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -223,6 +223,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -221,6 +221,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
@@ -124,7 +124,7 @@
registry->RegisterBooleanPref(
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2020,6 +2020,19 @@
@@ -2044,6 +2044,19 @@
<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>
+22 -16
View File
@@ -84,34 +84,40 @@
std::vector<user_data_importer::SourceProfile> DetectSourceProfilesWorker(
--- a/chrome/common/importer/firefox_importer_utils_linux.cc
+++ b/chrome/common/importer/firefox_importer_utils_linux.cc
@@ -9,17 +9,26 @@
#include "base/files/file_util.h"
#include "base/path_service.h"
@@ -51,9 +51,12 @@ constexpr const base::FilePath::CharType
constexpr const base::FilePath::CharType* const kFirefoxProfilesIniSubpath =
FILE_PATH_LITERAL(".mozilla/firefox/profiles.ini");
+constexpr const base::FilePath::CharType* const kZenProfilesIniSubpath =
+ FILE_PATH_LITERAL(".zen/profiles.ini");
+
} // namespace
-base::FilePath GetProfilesINI() {
+base::FilePath _GetProfilesINI(const char* folder) {
base::FilePath ini_file;
// The default location of the profile folder containing user data is
// under user HOME directory in .mozilla/firefox folder on Linux.
+base::FilePath _GetProfilesINI(const base::FilePath::CharType* ini_subpath) {
base::FilePath home;
base::PathService::Get(base::DIR_HOME, &home);
if (!home.empty()) {
- ini_file = home.Append(".mozilla/firefox/profiles.ini");
+ ini_file = home.Append(folder)
+ .Append("profiles.ini");
}
if (base::PathExists(ini_file))
return ini_file;
if (home.empty()) {
@@ -68,7 +71,7 @@ base::FilePath GetProfilesINI() {
for (const auto* profile_storage_base : kFirefoxProfileStorageBasePaths) {
base::FilePath ini_file = home;
ini_file = ini_file.Append(profile_storage_base)
- .Append(kFirefoxProfilesIniSubpath);
+ .Append(ini_subpath);
if (base::PathExists(ini_file)) {
return ini_file;
}
@@ -76,3 +79,11 @@ base::FilePath GetProfilesINI() {
return base::FilePath();
}
+
+base::FilePath GetProfilesINI() {
+ return _GetProfilesINI(".mozilla/firefox");
+ return _GetProfilesINI(kFirefoxProfilesIniSubpath);
+}
+
+base::FilePath GetZenProfilesINI() {
+ return _GetProfilesINI(".zen");
+ return _GetProfilesINI(kZenProfilesIniSubpath);
+}
--- a/chrome/common/importer/firefox_importer_utils_mac.mm
+++ b/chrome/common/importer/firefox_importer_utils_mac.mm
+6 -6
View File
@@ -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
@@ -1148,11 +1148,6 @@ void RenderViewContextMenu::InitMenu() {
@@ -1150,11 +1150,6 @@ void RenderViewContextMenu::InitMenu() {
AppendSpellingAndSearchSuggestionItems();
}
@@ -12,7 +12,7 @@
if (editable) {
AppendOtherEditableItems();
}
@@ -2254,7 +2249,6 @@ void RenderViewContextMenu::AppendPageIt
@@ -2265,7 +2260,6 @@ void RenderViewContextMenu::AppendPageIt
IDS_CONTENT_CONTEXT_SAVEPAGEAS);
menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
AppendLiveCaptionItem();
@@ -20,7 +20,7 @@
if (features::IsReadAnythingMenuShuffleExperimentEnabled()) {
// This will be set to false in AppendRegionSearchItem() if it is called.
@@ -2406,8 +2400,7 @@ void RenderViewContextMenu::AppendMediaR
@@ -2417,8 +2411,7 @@ void RenderViewContextMenu::AppendMediaR
void RenderViewContextMenu::AppendReadAnythingItem() {
// Show Read Anything option if it's not already open in the side panel.
@@ -30,7 +30,7 @@
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE,
IDS_CONTENT_CONTEXT_READING_MODE);
}
@@ -3689,10 +3682,12 @@ void RenderViewContextMenu::ExecuteComma
@@ -3731,10 +3724,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,
@@ -4070,6 +4065,8 @@ bool RenderViewContextMenu::IsVideoFrame
@@ -4133,6 +4128,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
@@ -312,6 +312,7 @@ void BrowserTabStripModelDelegate::AddTo
@@ -298,6 +298,7 @@ void BrowserTabStripModelDelegate::AddTo
}
bool BrowserTabStripModelDelegate::SupportsReadLater() {
+5 -4
View File
@@ -22,7 +22,7 @@
#include "components/prefs/pref_service.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
@@ -88,6 +89,12 @@ bool ShouldAccessUpdateService(const Pre
@@ -84,6 +85,12 @@ bool ShouldAccessUpdateService(const Pre
prefs.GetBoolean(prefs::kHeliumUpdateFetchingEnabled);
}
@@ -35,7 +35,7 @@
bool ShouldAccessUBlockAssets(const PrefService& prefs) {
return ShouldAccessServices(prefs) &&
prefs.GetBoolean(prefs::kHeliumUBlockAssetsEnabled);
@@ -132,6 +139,14 @@ GURL GetBrowserUpdateURL(const PrefServi
@@ -128,6 +135,14 @@ GURL GetBrowserUpdateURL(const PrefServi
#endif
}
@@ -137,7 +137,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -111,7 +112,21 @@ void ComponentInstaller::Register(Compon
@@ -111,7 +112,22 @@ void ComponentInstaller::Register(Compon
std::vector<uint8_t> public_key_hash;
installer_policy_->GetHash(&public_key_hash);
@@ -147,6 +147,7 @@
+ base::sorted_unique,
+ {
+ "hfnkpimlhhgieaddgfemjhofmfblmnib", // CRLSet
+ "oimompecagnajdejgnnjijobebaeigek", // WidevineCdm
+ }
+ );
+
@@ -161,7 +162,7 @@
std::move(callback), cus->GetRegisteredVersion(crx_id),
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7021,6 +7021,9 @@ Keep your key file in a safe place. You
@@ -7034,6 +7034,9 @@ Keep your key file in a safe place. You
<message name="IDS_COMPONENTS_SVC_STATUS_UPDATE_ERROR" desc="Service Status">
Update error
</message>
@@ -1,6 +1,6 @@
--- a/services/network/public/cpp/features.cc
+++ b/services/network/public/cpp/features.cc
@@ -437,7 +437,7 @@ BASE_FEATURE(kUpdateRequestForCorsRedire
@@ -442,7 +442,7 @@ BASE_FEATURE(kUpdateRequestForCorsRedire
// https://github.com/patcg-individual-drafts/topics
// Kill switch for the Topics API.
@@ -9,7 +9,7 @@
// 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
@@ -516,7 +516,7 @@ BASE_FEATURE(kSharedStorageTransactional
@@ -521,7 +521,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.
@@ -1,6 +1,6 @@
--- 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
@@ -1281,6 +1281,9 @@ gfx::Rect FedCmAccountSelectionView::Get
void FedCmAccountSelectionView::ShouldShowDialog(bool& should_show) {
if (dialog_type_ == DialogType::BUBBLE) {
@@ -1,6 +1,6 @@
--- a/components/history_clusters/core/features.cc
+++ b/components/history_clusters/core/features.cc
@@ -16,11 +16,7 @@ namespace history_clusters {
@@ -15,11 +15,7 @@ namespace history_clusters {
namespace {
constexpr auto enabled_by_default_desktop_only =
+1 -1
View File
@@ -1,6 +1,6 @@
--- a/ui/base/pointer/touch_ui_controller.cc
+++ b/ui/base/pointer/touch_ui_controller.cc
@@ -177,13 +177,7 @@ void TouchUiController::TouchUiScoperFor
@@ -178,13 +178,7 @@ void TouchUiController::TouchUiScoperFor
// static
TouchUiController* TouchUiController::Get() {
static base::NoDestructor<TouchUiController> instance([] {
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -739,7 +739,7 @@ bool HasTabSearchToolbarButton() {
@@ -525,7 +525,7 @@ bool HasTabSearchToolbarButton() {
return is_tab_search_moving;
}
@@ -10,7 +10,7 @@
return false;
--- a/components/user_education/common/tutorial/tutorial_registry.cc
+++ b/components/user_education/common/tutorial/tutorial_registry.cc
@@ -26,7 +26,6 @@ bool TutorialRegistry::IsTutorialRegiste
@@ -25,7 +25,6 @@ bool TutorialRegistry::IsTutorialRegiste
const TutorialDescription* TutorialRegistry::GetTutorialDescription(
TutorialIdentifier id) const {
@@ -18,7 +18,7 @@
auto pair = tutorial_registry_.find(id);
if (pair == tutorial_registry_.end()) {
return nullptr;
@@ -36,7 +35,6 @@ const TutorialDescription* TutorialRegis
@@ -35,7 +34,6 @@ const TutorialDescription* TutorialRegis
const std::vector<TutorialIdentifier> TutorialRegistry::GetTutorialIdentifiers()
const {
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -350,13 +350,7 @@ bool IsTabGroupMenuMoreEntryPointsEnable
@@ -136,13 +136,7 @@ bool IsTabGroupMenuMoreEntryPointsEnable
// Enables preview images in tab-hover cards.
// https://crbug.com/928954
@@ -23,7 +23,7 @@
if (tab_search_action.has_value()) {
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -693,7 +693,7 @@ BASE_FEATURE(kByDateHistoryInSidePanel,
@@ -479,7 +479,7 @@ BASE_FEATURE(kByDateHistoryInSidePanel,
BASE_FEATURE(kTabStripBrowserApi, base::FEATURE_DISABLED_BY_DEFAULT);
@@ -32,7 +32,7 @@
// This serves as a "kill-switch" for migrating the Tab Search feature to be a
// toolbar button for non-ChromeOS users in the US.
@@ -724,6 +724,8 @@ static std::string GetCountryCode() {
@@ -510,6 +510,8 @@ static std::string GetCountryCode() {
}
bool HasTabSearchToolbarButton() {
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -13778,11 +13778,381 @@ const FeatureEntry kFeatureEntries[] = {
@@ -13547,11 +13547,387 @@ const FeatureEntry kFeatureEntries[] = {
// AboutFlagsHistogramTest unit test to verify this process).
};
@@ -295,6 +295,12 @@
+ "chrome-web-store-navigation-throttle",
+ "supervised-user-block-interstitial-v3",
+
+ // New layout kill switches
+ // (old layout is disabled in 144 and removed in 146)
+ "app-browser-use-new-layout",
+ "popup-browser-use-new-layout",
+ "tabbed-browser-use-new-layout",
+
+ // Autofill
+ "reintroduce-hybrid-passkey-entry-point",
+ "fill-on-account-select",
@@ -383,7 +389,7 @@
FlagsStateSingleton(const FlagsStateSingleton&) = delete;
FlagsStateSingleton& operator=(const FlagsStateSingleton&) = delete;
~FlagsStateSingleton() override = default;
@@ -13801,7 +14171,7 @@ class FlagsStateSingleton : public flags
@@ -13570,7 +13946,7 @@ class FlagsStateSingleton : public flags
void RestoreDefaultState() {
flags_state_ =
@@ -392,7 +398,7 @@
}
private:
@@ -14128,7 +14498,7 @@ base::span<const FeatureEntry> GetFeatur
@@ -13907,7 +14283,7 @@ base::span<const FeatureEntry> GetFeatur
!entries_for_testing->empty()) {
return *entries_for_testing;
}
@@ -1,6 +1,6 @@
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -535,9 +535,12 @@ void ExtensionRegistrar::AddComponentExt
@@ -542,9 +542,12 @@ void ExtensionRegistrar::AddComponentExt
if (old_version.IsValid()) {
UnregisterServiceWorkerWithRootScope(extension);
}
@@ -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
@@ -193,17 +193,7 @@ void SavedTabGroupModelListener::OnTabSt
@@ -192,17 +192,7 @@ void SavedTabGroupModelListener::OnTabSt
return;
}
@@ -0,0 +1,89 @@
--- a/components/extstore_fixups/BUILD.gn
+++ b/components/extstore_fixups/BUILD.gn
@@ -16,6 +16,7 @@ generate_grd("extstore_fixups_grd") {
input_files_base_dir = rebase_path(".", "//")
input_files = [
"manifest.json",
+ "chrome-webstore.js",
]
}
--- a/components/extstore_fixups/manifest.json
+++ b/components/extstore_fixups/manifest.json
@@ -9,5 +9,10 @@
"version": "0.0.0",
"manifest_version": 3,
"content_scripts": [
+ {
+ "matches": [ "https://chromewebstore.google.com/*" ],
+ "run_at": "document_start",
+ "js": [ "chrome-webstore.js" ]
+ }
]
}
--- /dev/null
+++ b/components/extstore_fixups/chrome-webstore.js
@@ -0,0 +1,63 @@
+// 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.
+
+(() => {
+ const PROMO_POPUP_SELECTOR = 'header > [aria-labelledby=promo-header]';
+ const SWITCH_NAG_SELECTOR = 'main section [aria-label=Info]';
+ const SWITCH_BTN_SELECTOR = 'button[aria-label^=\'Switch to Chrome\']';
+ const removeChromeNags = () => {
+ const promoPopup = document.querySelector(PROMO_POPUP_SELECTOR);
+ if (promoPopup) {
+ promoPopup.remove();
+ }
+
+ const switchNag = document.querySelector(SWITCH_NAG_SELECTOR);
+ if (switchNag && switchNag.querySelector(SWITCH_BTN_SELECTOR)) {
+ switchNag.remove();
+ }
+ };
+
+ const replaceDownloadButtonText = (el) => {
+ if (el.nodeType === Node.TEXT_NODE) {
+ if (!el.nodeValue?.includes('Chrome')) {
+ return false;
+ }
+
+ el.nodeValue = el.nodeValue.replace(/\b(Google\s)?Chrome\b/, 'Helium');
+ return true;
+ } else if (el.childNodes) {
+ for (const node of el.childNodes) {
+ if (replaceDownloadButtonText(node)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ };
+
+ const changeDownloadButtonText = () => {
+ const mainTitles = document.querySelectorAll('main section h1');
+
+ for (const mainTitleEl of mainTitles) {
+ const downloadButton =
+ mainTitleEl?.parentElement?.parentElement?.querySelector('button');
+ if (!downloadButton || !downloadButton.textContent?.includes('Chrome')) {
+ continue;
+ }
+
+ if (replaceDownloadButtonText(downloadButton)) {
+ break;
+ }
+ }
+ };
+
+ const handleChanges = () => {
+ removeChromeNags();
+ changeDownloadButtonText();
+ };
+
+ const observer = new MutationObserver(handleChanges);
+ observer.observe(document, {childList: true, subtree: true});
+})();
@@ -0,0 +1,198 @@
--- /dev/null
+++ b/components/extstore_fixups/BUILD.gn
@@ -0,0 +1,37 @@
+# Copyright 2025 The Helium Authors
+# You can use, redistribute, and/or modify this source code under
+# the terms of the GPL-3.0 license that can be found in the LICENSE file.
+
+import("//ui/webui/resources/tools/generate_grd.gni")
+import("//tools/grit/grit_rule.gni")
+
+generated_grd = "$target_gen_dir/resources.grd"
+
+generate_grd("extstore_fixups_grd") {
+ out_grd = generated_grd
+
+ grd_prefix = "extstore_fixups"
+ resource_path_prefix = "extstore_fixups"
+
+ input_files_base_dir = rebase_path(".", "//")
+ input_files = [
+ "manifest.json",
+ ]
+}
+
+grit("extstore_fixups") {
+ source = generated_grd
+
+ # Required because the .grd is generated.
+ enable_input_discovery_for_gn_analyze = false
+ output_dir = "$target_gen_dir/resources"
+
+ outputs = [
+ "grit/extstore_fixups_resources.h",
+ "grit/extstore_fixups_resources_map.cc",
+ "grit/extstore_fixups_resources_map.h",
+ "extstore_fixups_resources.pak"
+ ]
+
+ deps = [":extstore_fixups_grd"]
+}
--- /dev/null
+++ b/components/extstore_fixups/manifest.json
@@ -0,0 +1,13 @@
+// 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.
+
+{
+ "name": "extstore-fixups",
+ // chrome-extension://jfnekidfgkhnfagaabpddmioknbjglgp
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGyNfoa6gmayvnBUHaYz2fNyPT7CIj6e5VccAZcIbpM/w9bhshiU0zxe0Ci+oLzHy3E/mObNM1IrXhHAQZno7H3frUxTH+m2eIGiwcqLfJkaQFkXvSoInpsG2N3Q74W6YN3mKk7rBAE8PQT1Nyh5H8AmIaWRvLz1+vcowpPNjU/QIDAQAB",
+ "version": "0.0.0",
+ "manifest_version": 3,
+ "content_scripts": [
+ ]
+}
--- /dev/null
+++ b/components/extstore_fixups/extension_ids.h
@@ -0,0 +1,15 @@
+// Copyright 2025 The Helium Authors
+// You can use, redistribute, and/or modify this source code under
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
+
+#ifndef COMPONENTS_EXTSTORE_FIXUPS_EXTENSION_IDS_H_
+#define COMPONENTS_EXTSTORE_FIXUPS_EXTENSION_IDS_H_
+
+namespace helium {
+
+inline constexpr char kExtstoreFixupsExtensionId[] =
+ "jfnekidfgkhnfagaabpddmioknbjglgp";
+
+} // namespace helium
+
+#endif /* COMPONENTS_EXTSTORE_FIXUPS_EXTENSION_IDS_H_ */
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -205,7 +205,7 @@
"META": {"sizes": {"includes": [20]}},
"includes": [2820],
},
- "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/ash/inline_login/resources.grd": {
+ "<(SHARED_INTERMEDIATE_DIR)/components/extstore_fixups/resources.grd": {
"META": {"sizes": {"includes": [20]}},
"includes": [2840],
},
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -141,6 +141,7 @@ template("chrome_extra_paks") {
"$root_gen_dir/components/translate_internals_resources.pak",
"$root_gen_dir/components/user_actions_ui_resources.pak",
"$root_gen_dir/components/version_ui_resources.pak",
+ "$root_gen_dir/components/extstore_fixups/resources/extstore_fixups_resources.pak",
"$root_gen_dir/content/attribution_internals_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/histograms_resources.pak",
@@ -169,6 +170,7 @@ template("chrome_extra_paks") {
"//components/enterprise/connectors/resources",
"//components/metrics:server_urls_grd",
"//components/resources",
+ "//components/extstore_fixups",
"//content:content_resources",
"//content/browser/resources",
"//mojo/public/js:resources",
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -588,6 +588,7 @@ source_set("extensions") {
"//components/update_client:common_impl",
"//components/user_prefs",
"//components/vector_icons",
+ "//components/extstore_fixups",
"//content/public/browser",
"//extensions/browser",
"//extensions/browser/api/storage:settings_namespace",
--- a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
+++ b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
@@ -18,6 +18,7 @@
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/component_extension_resources_map.h"
#include "chrome/grit/theme_resources.h"
+#include "components/extstore_fixups/resources/grit/extstore_fixups_resources_map.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/buildflags/buildflags.h"
#include "extensions/common/constants.h"
@@ -96,6 +97,7 @@ ChromeComponentExtensionResourceManager:
AddComponentResourceEntries(kComponentExtensionResources);
AddComponentResourceEntries(kExtraComponentExtensionResources);
AddComponentResourceEntries(kUblockResources);
+ AddComponentResourceEntries(kExtstoreFixupsResources);
#if BUILDFLAG(IS_CHROMEOS)
// Add Files app JS modules resources.
--- a/chrome/browser/extensions/component_loader.h
+++ b/chrome/browser/extensions/component_loader.h
@@ -216,6 +216,7 @@ class ComponentLoader : public KeyedServ
const std::string& description_string);
void AddWebStoreApp();
void AddUBlock();
+ void AddExtstoreFixups();
#if BUILDFLAG(IS_CHROMEOS)
void AddChromeApp();
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -37,6 +37,7 @@
#include "chrome/grit/generated_resources.h"
#include "components/crx_file/id_util.h"
#include "components/version_info/version_info.h"
+#include "components/extstore_fixups/resources/grit/extstore_fixups_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "extensions/browser/extension_file_task_runner.h"
@@ -445,6 +446,11 @@ void ComponentLoader::AddUBlock() {
}
}
+void ComponentLoader::AddExtstoreFixups() {
+ Add(IDR_EXTSTORE_FIXUPS_MANIFEST_JSON,
+ base::FilePath(FILE_PATH_LITERAL("extstore_fixups")));
+}
+
#if BUILDFLAG(IS_CHROMEOS)
void ComponentLoader::AddChromeApp() {
AddWithNameAndDescription(
@@ -523,6 +529,7 @@ void ComponentLoader::AddDefaultComponen
if (!skip_session_components) {
AddWebStoreApp();
AddUBlock();
+ AddExtstoreFixups();
#if BUILDFLAG(IS_CHROMEOS)
AddChromeApp();
#endif // BUILDFLAG(IS_CHROMEOS)
--- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
+++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
@@ -16,6 +16,8 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/grit/browser_resources.h"
#include "components/helium_services/extension_ids.h"
+#include "components/extstore_fixups/extension_ids.h"
+#include "components/extstore_fixups/resources/grit/extstore_fixups_resources.h"
#include "extensions/buildflags/buildflags.h"
#include "extensions/common/constants.h"
#include "printing/buildflags/buildflags.h"
@@ -37,6 +39,7 @@ bool IsComponentExtensionAllowlisted(con
extension_misc::kInAppPaymentsSupportAppId,
extension_misc::kPdfExtensionId,
helium::kUBlockOriginComponentId,
+ helium::kExtstoreFixupsExtensionId,
#if BUILDFLAG(IS_CHROMEOS)
extension_misc::kAssessmentAssistantExtensionId,
extension_misc::kAccessibilityCommonExtensionId,
@@ -93,6 +96,7 @@ bool IsComponentExtensionAllowlisted(int
case IDR_READING_MODE_GDOCS_HELPER_MANIFEST:
case IDR_WEBSTORE_MANIFEST:
case IDR_UBLOCK_MANIFEST_JSON:
+ case IDR_EXTSTORE_FIXUPS_MANIFEST_JSON:
#if BUILDFLAG(IS_CHROMEOS)
// Separate ChromeOS list, as it is quite large.
+2 -2
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -394,11 +394,11 @@ namespace about_flags {
@@ -395,11 +395,11 @@ namespace about_flags {
namespace {
@@ -15,7 +15,7 @@
#endif // USE_AURA
#if defined(USE_AURA)
@@ -5266,11 +5266,13 @@ const FeatureEntry::Choice kOmniboxAutof
@@ -5225,11 +5225,13 @@ const FeatureEntry::Choice kOmniboxAutof
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
+19 -9
View File
@@ -15,7 +15,7 @@
#define IDC_VISIT_DESKTOP_OF_LRU_USER_5 34083
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1504,6 +1504,11 @@ inline constexpr char kPageColorsBlockLi
@@ -1501,6 +1501,11 @@ inline constexpr char kPageColorsBlockLi
inline constexpr char kPrefersDefaultScrollbarStyles[] =
"settings.a11y.prefers_default_scrollbar_styles";
@@ -29,7 +29,7 @@
// 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
@@ -153,6 +153,8 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -151,6 +151,8 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
registry->RegisterBooleanPref(prefs::kWebRtcTextLogCollectionAllowed, false);
@@ -40,7 +40,7 @@
registry->RegisterBooleanPref(policy::policy_prefs::kHideWebStoreIcon, false);
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -406,7 +406,9 @@ bool BrowserCommandController::IsReserve
@@ -408,7 +408,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 ||
@@ -51,7 +51,7 @@
}
void BrowserCommandController::TabStateChanged() {
@@ -1205,6 +1207,14 @@ bool BrowserCommandController::ExecuteCo
@@ -1207,6 +1209,14 @@ bool BrowserCommandController::ExecuteCo
case IDC_DUPLICATE_TARGET_TAB:
DuplicateKeyboardFocusedTab(browser_);
break;
@@ -66,7 +66,7 @@
// Hosted App commands
case IDC_COPY_URL:
CopyURL(browser_, browser_->tab_strip_model()->GetActiveWebContents());
@@ -1984,6 +1994,12 @@ void BrowserCommandController::UpdateCom
@@ -1994,6 +2004,12 @@ void BrowserCommandController::UpdateCom
bool dev_tools_enabled = DevToolsWindow::AllowDevToolsFor(
profile(), browser_->tab_strip_model()->GetActiveWebContents());
@@ -108,17 +108,18 @@
{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 {
@@ -37,7 +37,9 @@ 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_NEW_SPLIT_TAB, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_N},
{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 {
@@ -73,9 +75,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},
@@ -142,7 +143,7 @@
"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
@@ -591,6 +591,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -584,6 +584,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kCaretBrowsingEnabled] =
settings_api::PrefType::kBoolean;
@@ -172,7 +173,7 @@
<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
@@ -285,6 +285,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},
@@ -221,6 +222,15 @@
Item(IDS_PASTE_MAC)
.tag(IDC_CONTENT_CONTEXT_PASTE)
.action(@selector(paste:)),
@@ -523,6 +525,8 @@ NSMenuItem* BuildTabMenu(NSApplication*
.submenu({
Item(IDS_TAB_CXMENU_NEWTABTORIGHT)
.command_id(IDC_NEW_TAB_TO_RIGHT),
+ Item(IDS_TAB_CXMENU_ADD_TAB_TO_NEW_SPLIT)
+ .command_id(IDC_NEW_SPLIT_TAB),
Item(IDS_NEXT_TAB_MAC)
.command_id(IDC_SELECT_NEXT_TAB),
Item(IDS_PREV_TAB_MAC)
--- a/chrome/browser/ui/cocoa/share_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/share_menu_controller.mm
@@ -98,12 +98,6 @@ bool CanShare() {
@@ -1,6 +1,6 @@
--- a/components/performance_manager/user_tuning/prefs.cc
+++ b/components/performance_manager/user_tuning/prefs.cc
@@ -25,7 +25,7 @@ void RegisterLocalStatePrefs(PrefRegistr
@@ -24,7 +24,7 @@ void RegisterLocalStatePrefs(PrefRegistr
kMemorySaverModeTimeBeforeDiscardInMinutes,
kDefaultMemorySaverModeTimeBeforeDiscardInMinutes);
registry->RegisterIntegerPref(
+5 -5
View File
@@ -34,7 +34,7 @@
BASE_FEATURE(kAIPageContentIncludePopupWindows,
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -43,6 +43,7 @@ BLINK_COMMON_EXPORT extern const base::F
@@ -42,6 +42,7 @@ BLINK_COMMON_EXPORT extern const base::F
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoise);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCanvas);
@@ -94,7 +94,7 @@
uint32_t length,
--- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
@@ -921,7 +921,12 @@ double AudioContext::baseLatency() const
@@ -969,7 +969,12 @@ double AudioContext::baseLatency() const
DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_sequence_checker_);
DCHECK(destination());
@@ -134,7 +134,7 @@
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
@@ -777,6 +782,35 @@ LocalDOMWindow* BaseAudioContext::GetWin
@@ -776,6 +781,35 @@ LocalDOMWindow* BaseAudioContext::GetWin
return To<LocalDOMWindow>(GetExecutionContext());
}
@@ -183,7 +183,7 @@
--- a/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc
+++ b/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc
@@ -396,6 +396,8 @@ void OfflineAudioContext::FireCompletion
@@ -413,6 +413,8 @@ void OfflineAudioContext::FireCompletion
return;
}
@@ -323,7 +323,7 @@
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -630,7 +630,6 @@
@@ -634,7 +634,6 @@
// AudioContext.playoutStats interface.
// https://chromestatus.com/feature/5172818344148992
name: "AudioContextPlayoutStats",
+2 -2
View File
@@ -70,7 +70,7 @@
BASE_FEATURE(kAIPageContentIncludePopupWindows,
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -42,6 +42,7 @@ BLINK_COMMON_EXPORT extern const base::F
@@ -41,6 +41,7 @@ BLINK_COMMON_EXPORT extern const base::F
// on the identifier name of the generated feature.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoise);
@@ -404,7 +404,7 @@
#include "third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.h"
#include "third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h"
#include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h"
@@ -343,11 +344,13 @@ ScriptPromise<Blob> OffscreenCanvas::con
@@ -342,11 +343,13 @@ ScriptPromise<Blob> OffscreenCanvas::con
base::TimeTicks start_time = base::TimeTicks::Now();
scoped_refptr<StaticBitmapImage> image_bitmap = context_->GetImage();
if (image_bitmap) {
+31 -29
View File
@@ -71,7 +71,7 @@
BASE_FEATURE(kAIPageContentIncludePopupWindows,
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -41,6 +41,8 @@ BLINK_COMMON_EXPORT extern const base::F
@@ -40,6 +40,8 @@ BLINK_COMMON_EXPORT extern const base::F
// `RuntimeEnabledFeatures)`, they should still be ordered in this section based
// on the identifier name of the generated feature.
@@ -250,7 +250,7 @@
+#endif // CONTENT_BROWSER_HELIUM_NOISE_NOISE_TOKEN_DATA_H_
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1180,6 +1180,8 @@ source_set("browser") {
@@ -1175,6 +1175,8 @@ source_set("browser") {
"handwriting/handwriting_recognition_service_impl.h",
"handwriting/handwriting_recognizer_impl.cc",
"handwriting/handwriting_recognizer_impl.h",
@@ -384,7 +384,7 @@
import("//third_party/blink/renderer/core/highlight/build.gni")
import("//third_party/blink/renderer/core/html/build.gni")
import("//third_party/blink/renderer/core/imagebitmap/build.gni")
@@ -273,6 +274,10 @@ component("core") {
@@ -267,6 +268,10 @@ component("core") {
# deps section below. For unit tests, do the same thing in the "unit_tests"
# component. If the directory contains sources that should be compiled with
# extra optimization flags, see the "core_hot" target below.
@@ -471,7 +471,7 @@
+};
--- /dev/null
+++ b/third_party/blink/public/common/helium_noise/noise_token_mojom_traits.h
@@ -0,0 +1,62 @@
@@ -0,0 +1,64 @@
+// Copyright 2026 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.
@@ -483,6 +483,8 @@
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_HELIUM_NOISE_NOISE_TOKEN_MOJOM_TRAITS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_HELIUM_NOISE_NOISE_TOKEN_MOJOM_TRAITS_H_
+
+#include "base/notreached.h"
+
+#include "third_party/blink/public/common/common_export.h"
+#include "third_party/blink/public/common/helium_noise/noise_token.h"
+#include "third_party/blink/public/mojom/helium_noise/noise_token.mojom-shared.h"
@@ -579,7 +581,7 @@
+}
--- a/third_party/blink/public/mojom/BUILD.gn
+++ b/third_party/blink/public/mojom/BUILD.gn
@@ -317,6 +317,7 @@ mojom("mojom_platform") {
@@ -319,6 +319,7 @@ mojom("mojom_platform") {
"//skia/public/mojom",
"//third_party/blink/public/mojom/content_extraction",
"//third_party/blink/public/mojom/fingerprinting_protection",
@@ -587,7 +589,7 @@
"//third_party/blink/public/mojom/gpu",
"//third_party/blink/public/mojom/origin_trials:origin_trial_feature",
"//third_party/blink/public/mojom/origin_trials:origin_trial_state",
@@ -1403,6 +1404,7 @@ mojom("mojom_core") {
@@ -1348,6 +1349,7 @@ mojom("mojom_core") {
"//services/viz/public/mojom",
"//skia/public/mojom",
"//third_party/blink/public/mojom/fingerprinting_protection",
@@ -641,7 +643,7 @@
SetSupportsDraggableRegions(bool supports_draggable_regions);
--- a/third_party/blink/renderer/core/execution_context/execution_context.h
+++ b/third_party/blink/renderer/core/execution_context/execution_context.h
@@ -37,6 +37,7 @@
@@ -36,6 +36,7 @@
#include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink-forward.h"
#include "services/network/public/mojom/referrer_policy.mojom-blink-forward.h"
#include "third_party/blink/public/common/fingerprinting_protection/noise_token.h"
@@ -649,7 +651,7 @@
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink-forward.h"
@@ -512,6 +513,23 @@ class CORE_EXPORT ExecutionContext : pub
@@ -471,6 +472,23 @@ class CORE_EXPORT ExecutionContext : pub
return net::StorageAccessApiStatus::kNone;
}
@@ -673,15 +675,15 @@
const std::optional<NoiseToken>& CanvasNoiseToken() const {
return canvas_noise_token_;
}
@@ -863,6 +881,8 @@ class CORE_EXPORT ExecutionContext : pub
@@ -543,6 +561,8 @@ class CORE_EXPORT ExecutionContext : pub
bool require_trusted_types_ = false;
+ HeliumNoiseTokenMap noise_tokens_;
+
std::optional<NoiseToken> canvas_noise_token_;
};
ForwardDeclaredMember<GlobalIndexedDB> global_indexed_db_;
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -36,6 +36,7 @@
@@ -721,7 +723,7 @@
#include "third_party/blink/public/common/metrics/document_update_reason.h"
#include "third_party/blink/public/common/page/color_provider_color_maps.h"
#include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-blink-forward.h"
@@ -136,7 +137,8 @@ class CORE_EXPORT Page final : public Ga
@@ -129,7 +130,8 @@ class CORE_EXPORT Page final : public Ga
Page* opener,
AgentGroupScheduler& agent_group_scheduler,
const base::UnguessableToken& browsing_context_group_token,
@@ -731,7 +733,7 @@
Page(base::PassKey<Page>,
ChromeClient& chrome_client,
@@ -193,6 +195,14 @@ class CORE_EXPORT Page final : public Ga
@@ -186,6 +188,14 @@ class CORE_EXPORT Page final : public Ga
color_provider_colors_ = color_provider_colors;
}
@@ -746,7 +748,7 @@
void InitialStyleChanged();
void UpdateAcceleratedCompositingSettings();
@@ -719,6 +729,9 @@ class CORE_EXPORT Page final : public Ga
@@ -660,6 +670,9 @@ class CORE_EXPORT Page final : public Ga
// who may depend on the main Page for colors.
ColorProviderColorMaps color_provider_colors_;
@@ -766,7 +768,7 @@
#include "third_party/blink/public/common/history/session_history_constants.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_menu_source_type.h"
@@ -502,7 +503,8 @@ WebView* WebView::Create(
@@ -503,7 +504,8 @@ WebView* WebView::Create(
const base::UnguessableToken& browsing_context_group_token,
const ColorProviderColorMaps* color_provider_colors,
int32_t history_index,
@@ -776,7 +778,7 @@
return WebViewImpl::Create(
client,
is_hidden ? mojom::blink::PageVisibilityState::kHidden
@@ -511,7 +513,8 @@ WebView* WebView::Create(
@@ -512,7 +514,8 @@ WebView* WebView::Create(
widgets_never_composited, To<WebViewImpl>(opener), std::move(page_handle),
agent_group_scheduler, session_storage_namespace_id,
std::move(page_base_background_color), browsing_context_group_token,
@@ -786,7 +788,7 @@
}
WebViewImpl* WebViewImpl::Create(
@@ -530,14 +533,15 @@ WebViewImpl* WebViewImpl::Create(
@@ -531,14 +534,15 @@ WebViewImpl* WebViewImpl::Create(
const base::UnguessableToken& browsing_context_group_token,
const ColorProviderColorMaps* color_provider_colors,
int32_t history_index,
@@ -804,7 +806,7 @@
}
size_t WebView::GetWebViewCount() {
@@ -603,7 +607,8 @@ WebViewImpl::WebViewImpl(
@@ -604,7 +608,8 @@ WebViewImpl::WebViewImpl(
const base::UnguessableToken& browsing_context_group_token,
const ColorProviderColorMaps* color_provider_colors,
int32_t history_index,
@@ -814,7 +816,7 @@
: widgets_never_composited_(widgets_never_composited),
web_view_client_(client),
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
@@ -636,7 +641,8 @@ WebViewImpl::WebViewImpl(
@@ -637,7 +642,8 @@ WebViewImpl::WebViewImpl(
page_ = Page::CreateOrdinary(
*chrome_client_, opener ? opener->GetPage() : nullptr,
agent_group_scheduler.GetAgentGroupScheduler(),
@@ -824,7 +826,7 @@
CoreInitializer::GetInstance().ProvideModulesToPage(
*page_, session_storage_namespace_id_);
@@ -3406,6 +3412,20 @@ void WebViewImpl::UpdateColorProviders(
@@ -3553,6 +3559,20 @@ void WebViewImpl::UpdateColorProviders(
}
}
@@ -866,7 +868,7 @@
void DispatchPersistedPageshow(base::TimeTicks navigation_start);
void DispatchPagehide(mojom::blink::PagehideDispatch pagehide_dispatch);
@@ -725,7 +728,8 @@ class CORE_EXPORT WebViewImpl final : pu
@@ -727,7 +730,8 @@ class CORE_EXPORT WebViewImpl final : pu
const base::UnguessableToken& browsing_context_group_token,
const ColorProviderColorMaps* color_provider_colors,
int32_t history_index,
@@ -878,7 +880,7 @@
void ConfigureAutoResizeMode();
--- a/third_party/blink/renderer/core/page/page.cc
+++ b/third_party/blink/renderer/core/page/page.cc
@@ -217,12 +217,14 @@ Page* Page::CreateOrdinary(
@@ -216,12 +216,14 @@ Page* Page::CreateOrdinary(
Page* opener,
AgentGroupScheduler& agent_group_scheduler,
const base::UnguessableToken& browsing_context_group_token,
@@ -896,7 +898,7 @@
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2855,6 +2855,9 @@ void DocumentLoader::CommitNavigation()
@@ -2859,6 +2859,9 @@ void DocumentLoader::CommitNavigation()
frame_->DomWindow()->SetCanvasNoiseToken(std::nullopt);
@@ -924,7 +926,7 @@
#include "third_party/perfetto/include/perfetto/tracing/track.h"
#include "url/gurl.h"
#include "url/origin.h"
@@ -746,6 +748,15 @@ void BrowsingDataRemoverImpl::RemoveImpl
@@ -731,6 +733,15 @@ void BrowsingDataRemoverImpl::RemoveImpl
}
}
@@ -942,7 +944,7 @@
embedder_delegate_->RemoveEmbedderData(
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -2008,6 +2008,12 @@ ContentBrowserClient::GetClipboardTypesI
@@ -1980,6 +1980,12 @@ ContentBrowserClient::GetClipboardTypesI
return std::nullopt;
}
@@ -957,7 +959,7 @@
}
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -3341,6 +3341,11 @@ class CONTENT_EXPORT ContentBrowserClien
@@ -3315,6 +3315,11 @@ class CONTENT_EXPORT ContentBrowserClien
GetClipboardTypesIfPolicyApplied(
const ui::ClipboardSequenceNumberToken& seqno);
@@ -1004,7 +1006,7 @@
}
--- a/content/browser/renderer_host/navigation_request.h
+++ b/content/browser/renderer_host/navigation_request.h
@@ -1474,6 +1474,16 @@ class CONTENT_EXPORT NavigationRequest
@@ -1475,6 +1475,16 @@ class CONTENT_EXPORT NavigationRequest
bool is_ad_tagged() const { return is_ad_tagged_; }
@@ -1021,7 +1023,7 @@
// Called when the browser process is about to process beforeunload handlers
// for this navigation, including sending an IPC to the renderer process to
// run beforeunload handlers when necessary.
@@ -3382,6 +3392,10 @@ class CONTENT_EXPORT NavigationRequest
@@ -3401,6 +3411,10 @@ class CONTENT_EXPORT NavigationRequest
blink::mojom::ConfidenceLevel confidence_level_ =
blink::mojom::ConfidenceLevel::kHigh;
@@ -1075,7 +1077,7 @@
std::optional<SkColor> main_document_theme_color_;
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -12375,6 +12375,22 @@ void RenderFrameHostImpl::CommitNavigati
@@ -12442,6 +12442,22 @@ void RenderFrameHostImpl::CommitNavigati
}
}
@@ -1098,7 +1100,7 @@
bool is_srcdoc = common_params->url.IsAboutSrcdoc();
if (is_srcdoc) {
// TODO(wjmaclean): initialize this in NavigationRequest's constructor
@@ -15889,6 +15905,15 @@ bool RenderFrameHostImpl::DidCommitNavig
@@ -15960,6 +15976,15 @@ bool RenderFrameHostImpl::DidCommitNavig
document_associated_data_->owned_page()->set_last_main_document_source_id(
ukm::ConvertToSourceId(navigation_request->GetNavigationId(),
ukm::SourceIdType::NAVIGATION_ID));
+208 -82
View File
@@ -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
@@ -214,6 +214,8 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -212,6 +212,8 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
@@ -34,24 +34,24 @@
registry->RegisterBooleanPref(
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -58,6 +58,7 @@
#include "chrome/common/chrome_version.h"
@@ -59,6 +59,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/webui_url_constants.h"
+#include "components/helium_services/pref_names.h"
#include "components/custom_handlers/protocol_handler_registry.h"
+#include "components/helium_services/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
@@ -488,6 +489,15 @@ StartupBrowserCreatorImpl::DetermineStar
#include "components/signin/public/base/signin_switches.h"
@@ -495,6 +496,15 @@ StartupBrowserCreatorImpl::DetermineStar
LaunchResult launch_result =
tabs.empty() ? LaunchResult::kNormally : LaunchResult::kWithGivenUrls;
+ bool no_first_run = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kNoFirstRun);
+ bool no_first_run =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoFirstRun);
+ if (!is_incognito_or_guest && !no_first_run) {
+ if (!profile_->GetPrefs()->GetBoolean(prefs::kHeliumDidOnboarding)) {
+ UrlsToTabs({ GURL(chrome::kHeliumSetupURL) }, &tabs);
+ return { tabs, LaunchResult::kWithGivenUrls };
+ UrlsToTabs({GURL(chrome::kHeliumSetupURL)}, &tabs);
+ return {tabs, LaunchResult::kWithGivenUrls};
+ }
+ }
+
@@ -61,11 +61,11 @@
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1254,6 +1254,10 @@
"META": {"sizes": {"includes": [5]}},
"includes": [7490],
"META": {"sizes": {"includes": [10]}},
"includes": [7495],
},
+ "<(SHARED_INTERMEDIATE_DIR)/components/helium_onboarding/resources.grd": {
+ "META": {"sizes": {"includes": [30],}},
+ "META": {"sizes": {"includes": [48],}},
+ "includes": [7510],
+ },
# END components/ section.
@@ -73,17 +73,17 @@
# START ios/ section.
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -8598,6 +8598,7 @@ static_library("browser_generated_files"
@@ -8587,6 +8587,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",
+ "//components/helium_onboarding:generated_resources",
"//components/autofill/core/browser/ml_model/logging:mojo_bindings",
"//components/data_sharing/data_sharing_internals/webui:mojo_bindings",
"//components/webui/chrome_urls/mojom:mojo_bindings",
"//components/enterprise/connectors:mojom",
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -474,11 +474,13 @@ template("chrome_extra_paks") {
@@ -473,11 +473,13 @@ template("chrome_extra_paks") {
if (!is_android && !is_chromeos) {
sources += [
"$root_gen_dir/chrome/intro_resources.pak",
@@ -105,11 +105,11 @@
content::kChromeUIQuotaInternalsHost,
+ kHeliumSetupHost,
#if !BUILDFLAG(IS_ANDROID)
kChromeUIReloadButtonHost,
kChromeUIWebUIToolbarHost,
#endif
--- a/chrome/common/webui_url_constants.h
+++ b/chrome/common/webui_url_constants.h
@@ -605,6 +605,8 @@ inline constexpr char kChromeUIProfilePi
@@ -601,6 +601,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
@@ -164,6 +164,10 @@ static_library("ui") {
@@ -167,6 +167,10 @@ static_library("ui") {
"webui/net_internals/net_internals_ui.h",
"webui/ntp_tiles_internals_ui.cc",
"webui/ntp_tiles_internals_ui.h",
@@ -133,15 +133,15 @@
"webui/omnibox/omnibox_ui.cc",
--- a/chrome/browser/ui/webui/chrome_web_ui_configs.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_configs.cc
@@ -38,6 +38,7 @@
#include "chrome/browser/ui/webui/net_export_ui.h"
@@ -39,6 +39,7 @@
#include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
#include "chrome/browser/ui/webui/ntp_tiles_internals_ui.h"
+#include "chrome/browser/ui/webui/onboarding/onboarding_page_ui.h"
#include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
+#include "chrome/browser/ui/webui/onboarding/onboarding_page_ui.h"
#include "chrome/browser/ui/webui/policy/policy_ui.h"
#include "chrome/browser/ui/webui/predictors/predictors_ui.h"
@@ -429,6 +430,7 @@ void RegisterChromeWebUIConfigs() {
#include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_ui.h"
@@ -430,6 +431,7 @@ void RegisterChromeWebUIConfigs() {
#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
map.AddWebUIConfig(std::make_unique<ManagedUserProfileNoticeUIConfig>());
map.AddWebUIConfig(std::make_unique<IntroUIConfig>());
@@ -151,7 +151,7 @@
map.AddWebUIConfig(std::make_unique<SigninErrorUIConfig>());
--- /dev/null
+++ b/chrome/browser/ui/webui/onboarding/onboarding_page_ui.cc
@@ -0,0 +1,41 @@
@@ -0,0 +1,46 @@
+// 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.
@@ -166,24 +166,29 @@
+#include "chrome/common/webui_url_constants.h"
+#include "components/helium_onboarding/resources/grit/helium_onboarding_generated.h"
+#include "components/helium_onboarding/resources/grit/helium_onboarding_generated_map.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "ui/webui/webui_util.h"
+
+HeliumOnboardingPage::HeliumOnboardingPage(content::WebUI* web_ui)
+ : WebUIController(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::BrowserContext* browser_context =
+ web_ui->GetWebContents()->GetBrowserContext();
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ content::WebUIDataSource* source =
+ content::WebUIDataSource::CreateAndAdd(profile, chrome::kHeliumSetupHost);
+
+ webui::SetupWebUIDataSource(source, kHeliumOnboardingGenerated,
+ IDR_HELIUM_ONBOARDING_INDEX_HTML);
+
+ source->UseStringsJs();
+ // TODO: remove this call once the following issue/s are resolved:
+ // https://github.com/sveltejs/svelte/issues/10826
+ // https://github.com/sveltejs/svelte/issues/14438
+ source->DisableTrustedTypesCSP();
+
+ web_ui->AddMessageHandler(
+ std::make_unique<OnboardingMessageHandler>(profile));
+ std::make_unique<OnboardingMessageHandler>(browser_context));
+ web_ui->AddMessageHandler(
+ std::make_unique<settings::SearchEnginesHandler>(profile));
+ web_ui->AddMessageHandler(
@@ -229,7 +234,7 @@
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
--- /dev/null
+++ b/chrome/browser/ui/webui/onboarding/onboarding_handler.cc
@@ -0,0 +1,188 @@
@@ -0,0 +1,281 @@
+// 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.
@@ -241,22 +246,27 @@
+#include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/extensions/webstore_install_with_prompt.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_attributes_storage.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/profiles/profiles_state.h"
+#include "chrome/browser/themes/theme_service.h"
+#include "chrome/browser/themes/theme_service_factory.h"
+#include "chrome/browser/ui/color/chrome_color_id.h"
+#include "chrome/common/extensions/webstore_install_result.h"
+#include "components/helium_services/pref_names.h"
+#include "components/helium_services/schema.h"
+#include "components/prefs/pref_change_registrar.h"
+#include "components/prefs/pref_service.h"
+#include "content/public/browser/web_contents.h"
+#include "ui/color/color_provider.h"
+#include "ui/gfx/color_utils.h"
+#include "content/public/browser/web_ui.h"
+#include "extensions/browser/extension_registrar.h"
+#include "extensions/browser/extension_registry.h"
+#include "extensions/common/extension.h"
+
+OnboardingMessageHandler::OnboardingMessageHandler(Profile* profile)
+ : profile_(profile), pref_service_(profile->GetPrefs()) {
+OnboardingMessageHandler::OnboardingMessageHandler(
+ content::BrowserContext* browser_context)
+ : browser_context_(browser_context),
+ profile_(Profile::FromBrowserContext(browser_context)),
+ pref_service_(profile_->GetPrefs()) {
+ pref_change_registrar_.Init(pref_service_);
+
+ for (const auto [key, _] : GetPreferencesDict()) {
@@ -265,13 +275,9 @@
+ base::BindRepeating(&OnboardingMessageHandler::OnPreferencesChanged,
+ base::Unretained(this)));
+ }
+
+ ThemeServiceFactory::GetForProfile(profile_)->AddObserver(this);
+}
+
+OnboardingMessageHandler::~OnboardingMessageHandler() {
+ ThemeServiceFactory::GetForProfile(profile_)->RemoveObserver(this);
+}
+OnboardingMessageHandler::~OnboardingMessageHandler() = default;
+
+base::Value::Dict OnboardingMessageHandler::GetPreferencesDict() {
+ std::vector<PrefService::PreferenceValueAndStore> values =
@@ -291,16 +297,34 @@
+ return output;
+}
+
+void OnboardingMessageHandler::OnThemeChanged() {
+ AllowJavascript();
+ FireWebUIListener("ntp-background-changed", GetNTPBackgroundColor());
+}
+
+void OnboardingMessageHandler::OnPreferencesChanged() {
+ AllowJavascript();
+ FireWebUIListener("helium-prefs-changed", GetPreferencesDict());
+}
+
+void OnboardingMessageHandler::OnExtensionLoaded(
+ content::BrowserContext*,
+ const extensions::Extension* extension) {
+ AllowJavascript();
+ FireWebUIListener("extension-state-changed",
+ base::Value::Dict().Set(extension->id(), true));
+}
+
+void OnboardingMessageHandler::OnExtensionUnloaded(
+ content::BrowserContext*,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionReason reason) {
+ using extensions::UnloadedExtensionReason;
+ if (reason != UnloadedExtensionReason::DISABLE &&
+ reason != UnloadedExtensionReason::UNINSTALL) {
+ return;
+ }
+
+ AllowJavascript();
+ FireWebUIListener("extension-state-changed",
+ base::Value::Dict().Set(extension->id(), false));
+}
+
+void OnboardingMessageHandler::RegisterMessages() {
+ web_ui()->RegisterMessageCallback(
+ "getPrefs",
@@ -323,24 +347,98 @@
+ base::BindRepeating(&OnboardingMessageHandler::HandleSetProfileName,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "getBackgroundColor",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetBackgroundColor,
+ "getExtensions",
+ base::BindRepeating(&OnboardingMessageHandler::HandleGetExtensions,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "installExtension",
+ base::BindRepeating(&OnboardingMessageHandler::HandleInstallExtension,
+ base::Unretained(this)));
+}
+
+base::Value OnboardingMessageHandler::GetNTPBackgroundColor() {
+ return base::Value(color_utils::SkColorToRgbaString(
+ web_ui()->GetWebContents()->GetColorProvider().GetColor(
+ kColorNewTabPageBackground)));
+}
+
+void OnboardingMessageHandler::HandleGetBackgroundColor(
+void OnboardingMessageHandler::HandleGetExtensions(
+ const base::Value::List& args) {
+ CHECK_EQ(1U, args.size());
+ const auto& callback_id = args[0].GetString();
+ auto* registry = extensions::ExtensionRegistry::Get(browser_context_);
+
+ base::Value::Dict filtered_extension_data;
+ for (const auto& extension : registry->enabled_extensions()) {
+ filtered_extension_data.Set(extension->id(), true);
+ }
+
+ for (const auto& extension : registry->disabled_extensions()) {
+ filtered_extension_data.Set(extension->id(), false);
+ }
+
+ // If no one asked for a list of extensions yet, they probably don't
+ // care about extension changes, so we defer the observer init to here
+ // to avoid sending useless events.
+ if (!extension_registry_observation_.IsObserving()) {
+ extension_registry_observation_.Observe(registry);
+ }
+
+ AllowJavascript();
+ ResolveJavascriptCallback(base::Value(callback_id), GetNTPBackgroundColor());
+ ResolveJavascriptCallback(base::Value(std::move(callback_id)),
+ std::move(filtered_extension_data));
+}
+
+void OnboardingMessageHandler::HandleInstallExtension(
+ const base::Value::List& args) {
+ CHECK_EQ(2U, args.size());
+ const auto& callback_id = args[0].GetString();
+ const auto& extension_id = args[1].GetString();
+
+ // If the extension is already installed, but disabled, enable it.
+ const auto* registry = extensions::ExtensionRegistry::Get(browser_context_);
+ if (const auto* extension = registry->GetInstalledExtension(extension_id)) {
+ DoEnableExtension(callback_id, extension->id());
+ return;
+ }
+
+ // Otherwise, do the whole dance of installing an extension.
+ DoInstallExtension(callback_id, extension_id);
+}
+
+void OnboardingMessageHandler::DoEnableExtension(
+ const std::string& callback_id,
+ const std::string& extension_id) {
+ extensions::ExtensionRegistrar::Get(browser_context_)
+ ->EnableExtension(extension_id);
+ AllowJavascript();
+ ResolveJavascriptCallback(base::Value(callback_id), base::Value());
+}
+
+void OnboardingMessageHandler::DoInstallExtension(
+ const std::string& callback_id,
+ const std::string& extension_id) {
+ gfx::NativeWindow window =
+ web_ui()->GetWebContents()->GetTopLevelNativeWindow();
+
+ // Pass a weak_ptr for the callback, as WebstoreInstallWithPrompt is
+ // ref-counted and might outlive OnboardingMessageHandler.
+ auto installer = base::MakeRefCounted<extensions::WebstoreInstallWithPrompt>(
+ extension_id, profile_, window,
+ base::BindOnce(&OnboardingMessageHandler::OnExtensionInstallFinished,
+ weak_ptr_factory_.GetWeakPtr(), callback_id));
+
+ installer->BeginInstall();
+}
+
+void OnboardingMessageHandler::OnExtensionInstallFinished(
+ std::string callback_id,
+ bool success,
+ const std::string& error,
+ extensions::webstore_install::Result result) {
+ AllowJavascript();
+ if (success) {
+ ResolveJavascriptCallback(base::Value(callback_id), base::Value());
+ return;
+ }
+
+ RejectJavascriptCallback(
+ base::Value(callback_id),
+ base::Value::Dict().Set("error", error).Set("code", result));
+}
+
+void OnboardingMessageHandler::HandleGetPreferences(
@@ -420,7 +518,7 @@
+}
--- /dev/null
+++ b/chrome/browser/ui/webui/onboarding/onboarding_handler.h
@@ -0,0 +1,52 @@
@@ -0,0 +1,76 @@
+// 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.
@@ -433,17 +531,23 @@
+
+#include "base/memory/raw_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/scoped_observation.h"
+#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/themes/theme_service_observer.h"
+#include "chrome/common/extensions/webstore_install_result.h"
+#include "components/prefs/pref_change_registrar.h"
+#include "components/prefs/pref_service.h"
+#include "content/public/browser/web_ui_message_handler.h"
+#include "extensions/browser/extension_registry_observer.h"
+
+namespace content {
+class BrowserContext;
+}
+
+class OnboardingMessageHandler : public content::WebUIMessageHandler,
+ public ThemeServiceObserver {
+ public extensions::ExtensionRegistryObserver {
+ public:
+ explicit OnboardingMessageHandler(Profile* profile);
+ explicit OnboardingMessageHandler(content::BrowserContext* browser_context);
+ OnboardingMessageHandler(const OnboardingMessageHandler&) = delete;
+ OnboardingMessageHandler& operator=(const OnboardingMessageHandler&) = delete;
+ ~OnboardingMessageHandler() override;
@@ -457,35 +561,49 @@
+ void HandleSetPreference(const base::Value::List& args);
+ void HandleGetProfileName(const base::Value::List& args);
+ void HandleSetProfileName(const base::Value::List& args);
+ void HandleGetBackgroundColor(const base::Value::List& args);
+ void HandleGetExtensions(const base::Value::List& args);
+ void HandleInstallExtension(const base::Value::List& args);
+ void OnPreferencesChanged();
+
+ base::Value GetNTPBackgroundColor();
+ void DoInstallExtension(const std::string& callback_id,
+ const std::string& extension_id);
+ void DoEnableExtension(const std::string& callback_id,
+ const std::string& extension_id);
+ void OnExtensionInstallFinished(std::string callback_id,
+ bool success,
+ const std::string& error,
+ extensions::webstore_install::Result);
+
+ // ThemeServiceObserver:
+ void OnThemeChanged() override;
+ // extensions::ExtensionRegistryObserver:
+ void OnExtensionLoaded(content::BrowserContext*,
+ const extensions::Extension*) override;
+ void OnExtensionUnloaded(content::BrowserContext*,
+ const extensions::Extension*,
+ extensions::UnloadedExtensionReason) override;
+
+ raw_ptr<content::BrowserContext> browser_context_ = nullptr;
+ raw_ptr<Profile> profile_ = nullptr;
+ raw_ptr<PrefService> pref_service_ = nullptr;
+ PrefChangeRegistrar pref_change_registrar_;
+
+ base::WeakPtrFactory<OnboardingMessageHandler> weak_ptr_factory_{this};
+
+ // extensions:ExtensionRegistryObserver:
+ base::ScopedObservation<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observation_{this};
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_HANDLER_H_
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -53,12 +53,18 @@ GURL GetDummyURL() {
@@ -53,12 +53,14 @@ GURL GetDummyURL() {
}
bool ShouldAccessServices(const PrefService& prefs) {
- return prefs.GetBoolean(prefs::kHeliumServicesEnabled);
+ // onboarding was completed without touching kHeliumServicesEnabled,
+ // OR the user has explicitly enabled kHeliumServicesEnabled somewhere
+ // (either via onboarding, or user settings)
+ return prefs.GetBoolean(prefs::kHeliumServicesEnabled) &&
+ (prefs.GetBoolean(prefs::kHeliumServicesConsented)
+ || prefs.HasPrefPath(prefs::kHeliumServicesEnabled));
+ prefs.GetBoolean(prefs::kHeliumServicesConsented);
}
void ConfigurePrefChangeRegistrarFor(std::string_view pref_name,
@@ -532,7 +650,7 @@
}
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1971,6 +1971,12 @@
@@ -1995,6 +1995,12 @@
<message name="IDS_SETTINGS_HELIUM_SCHEMA_IGNORE" desc="Checkbox label to ignore any future services change alerts">
Don't notify me again
</message>
@@ -547,7 +665,7 @@
</message>
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -364,6 +364,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -365,6 +365,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
settings_api::PrefType::kString;
@@ -556,18 +674,26 @@
// Privacy Guide
(*s_allowlist)[::prefs::kPrivacyGuideViewed] =
--- a/chrome/browser/resources/settings/privacy_page/services_page.ts
+++ b/chrome/browser/resources/settings/privacy_page/services_page.ts
@@ -94,6 +94,10 @@ export class SettingsHeliumServicesPageE
this.setPrefValue('helium.services.origin_override', target.value);
}
+
+ private onServicesPendingButtonClick_() {
+ window.open('chrome://setup', '_blank');
+ }
}
declare global {
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -25,10 +25,42 @@
@@ -25,10 +25,37 @@
margin-top: var(--cr-changelog-padding);
padding-top: calc(var(--cr-changelog-padding) / 2);
}
+
+ #onboarding-link {
+ color: var(--text-color-action);
+ text-decoration: none;
+ }
+
+ #onboarding-text {
+ display: flex;
+ align-items: center;
@@ -589,10 +715,10 @@
+ <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
+ class="action-button"
+ on-click="onServicesPendingButtonClick_">
+ $i18n{heliumServicesSetupPendingButton}
+ </cr-button>
+ </div>
+ </template>
@@ -601,7 +727,7 @@
<template is="dom-if" if="[[changes_.length]]">
<div id="changelog-notice">
<div id="changelog-title">$i18n{heliumSchemaUpdatedTitle}</div>
@@ -57,6 +89,7 @@
@@ -57,6 +84,7 @@
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
</cr-collapse>
</div>
@@ -611,7 +737,7 @@
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2145,6 +2145,8 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2190,6 +2190,8 @@ void AddPrivacyStrings(content::WebUIDat
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
{"heliumServicesTitle", IDS_SETTINGS_HELIUM_SERVICES},
{"heliumServicesDescription", IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION},
@@ -1,6 +1,6 @@
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1308,6 +1308,10 @@ inline constexpr char
@@ -1305,6 +1305,10 @@ inline constexpr char
"restricted_managed_guest_session_extension_cleanup_exempt_list";
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -39,7 +39,7 @@
#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"
@@ -1665,7 +1667,11 @@ void TabStripModel::AddTab(std::unique_p
@@ -1736,7 +1738,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()) {
@@ -66,7 +66,7 @@
</message>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -519,6 +519,7 @@ void AddAppearanceStrings(content::WebUI
@@ -522,6 +522,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},
@@ -76,7 +76,7 @@
{"tabStripPosition", IDS_SETTINGS_TAB_STRIP_POSITION},
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -227,6 +227,10 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -226,6 +226,10 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kUseCustomChromeFrame] =
settings_api::PrefType::kBoolean;
#endif
@@ -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
@@ -878,10 +878,18 @@ void RenderThreadImpl::RegisterSchemes()
@@ -823,10 +823,18 @@ void RenderThreadImpl::RegisterSchemes()
chrome_scheme);
WebSecurityPolicy::RegisterURLSchemeAsWebUI(chrome_scheme);
@@ -120,7 +120,7 @@
// handling.
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -1274,7 +1274,8 @@ bool ExtensionTabUtil::IsKillURL(const G
@@ -1099,7 +1099,8 @@ bool ExtensionTabUtil::IsKillURL(const G
return true;
}
@@ -132,7 +132,7 @@
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2245,6 +2245,13 @@ void Browser::SetContentsBounds(WebConte
@@ -2257,6 +2257,13 @@ void Browser::SetContentsBounds(WebConte
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -146,7 +146,7 @@
std::vector<StatusBubble*> status_bubbles = GetStatusBubbles();
for (StatusBubble* status_bubble : status_bubbles) {
StatusBubbleViews* status_bubble_views =
@@ -2252,7 +2259,7 @@ void Browser::UpdateTargetURL(WebContent
@@ -2264,7 +2271,7 @@ void Browser::UpdateTargetURL(WebContent
ContentsWebView* anchor =
static_cast<ContentsWebView*>(status_bubble_views->base_view());
if (source == anchor->GetWebContents()) {
@@ -188,7 +188,7 @@
#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"
@@ -564,6 +565,7 @@ const FormatUrlType kFormatUrlTrimAfterH
@@ -561,6 +562,7 @@ const FormatUrlType kFormatUrlTrimAfterH
const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7;
const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
const FormatUrlType kFormatUrlOmitMobilePrefix = 1 << 9;
@@ -196,7 +196,7 @@
const FormatUrlType kFormatUrlOmitDefaults =
kFormatUrlOmitUsernamePassword | kFormatUrlOmitHTTP |
@@ -626,6 +628,18 @@ std::u16string FormatUrlWithAdjustments(
@@ -623,6 +625,18 @@ std::u16string FormatUrlWithAdjustments(
prefix_end, adjustments);
}
@@ -318,7 +318,7 @@
} // namespace url_formatter
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -373,7 +373,7 @@ std::string ChromeAutocompleteProviderCl
@@ -374,7 +374,7 @@ std::string ChromeAutocompleteProviderCl
std::string
ChromeAutocompleteProviderClient::GetEmbedderRepresentationOfAboutScheme()
const {
@@ -342,7 +342,7 @@
// Match input about: or |embedderAbout| URL input against builtin URLs.
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -171,6 +171,7 @@
@@ -172,6 +172,7 @@
#include "components/tabs/public/tab_interface.h"
#include "components/translate/core/browser/language_state.h"
#include "components/translate/core/browser/translate_manager.h"
@@ -350,7 +350,7 @@
#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"
@@ -2473,7 +2474,12 @@ bool IsDebuggerAttachedToCurrentTab(Brow
@@ -2484,7 +2485,12 @@ bool IsDebuggerAttachedToCurrentTab(Brow
void CopyURL(BrowserWindowInterface* bwi, content::WebContents* web_contents) {
ui::ScopedClipboardWriter scw(ui::ClipboardBuffer::kCopyPaste);
@@ -366,7 +366,7 @@
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
@@ -565,7 +565,8 @@ void TabHoverCardBubbleView::UpdateCardC
url_formatter::kFormatUrlOmitDefaults |
url_formatter::kFormatUrlOmitHTTPS |
url_formatter::kFormatUrlOmitTrivialSubdomains |
@@ -1,6 +1,6 @@
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -1198,7 +1198,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
@@ -1229,7 +1229,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
// Automatically enables HTTPS-First Mode in a balanced configuration when
// possible.
BASE_FEATURE(kHttpsFirstBalancedModeAutoEnable,
@@ -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") {
@@ -464,6 +464,8 @@ static_library("common") {
"manifest_handlers/webview_info.h",
"manifest_url_handlers.cc",
"manifest_url_handlers.h",
@@ -166,7 +166,7 @@
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -362,6 +362,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -363,6 +363,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
// Helium services page
(*s_allowlist)[::prefs::kHeliumServicesEnabled] =
settings_api::PrefType::kBoolean;
@@ -177,7 +177,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -217,6 +217,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -215,6 +215,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterIntegerPref(prefs::kHeliumSchemaVersion, 0);
registry->RegisterBooleanPref(prefs::kHeliumDisableSchemaAlerts, false);
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
@@ -87,6 +87,11 @@
@@ -82,6 +82,11 @@
</settings-toggle-button>
<div class="cr-col">
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
@@ -201,7 +201,7 @@
</template>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2156,6 +2156,10 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2201,6 +2201,10 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SCHEMA_NOTICE_DESCRIPTION},
{"heliumGotIt", IDS_SETTINGS_GOT_IT},
{"heliumSchemaIgnore", IDS_SETTINGS_HELIUM_SCHEMA_IGNORE},
@@ -214,7 +214,7 @@
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1999,6 +1999,12 @@
@@ -2023,6 +2023,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>
@@ -249,8 +249,8 @@
#include "components/helium_services/pref_names.h"
#include "components/prefs/pref_service.h"
#include "net/base/url_util.h"
@@ -61,6 +62,28 @@ bool ShouldAccessServices(const PrefServ
|| prefs.HasPrefPath(prefs::kHeliumServicesEnabled));
@@ -57,6 +58,28 @@ bool ShouldAccessServices(const PrefServ
prefs.GetBoolean(prefs::kHeliumServicesConsented);
}
+bool ShouldAccessExtensionService(const PrefService& prefs) {
@@ -294,8 +294,8 @@
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -558,6 +558,7 @@ source_set("extensions") {
"//components/enterprise",
@@ -561,6 +561,7 @@ source_set("extensions") {
"//components/favicon/content",
"//components/guest_view/buildflags",
"//components/guest_view/common",
+ "//components/helium_services",
@@ -304,7 +304,7 @@
"//components/no_state_prefetch/browser",
--- a/extensions/browser/pending_extension_manager.cc
+++ b/extensions/browser/pending_extension_manager.cc
@@ -14,11 +14,14 @@
@@ -13,11 +13,14 @@
#include "base/version.h"
#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
@@ -319,7 +319,7 @@
#include "url/gurl.h"
namespace {
@@ -214,11 +217,11 @@ bool PendingExtensionManager::AddFromExt
@@ -213,11 +216,11 @@ bool PendingExtensionManager::AddFromExt
creation_flags, mark_acknowledged, kRemoteInstall);
}
@@ -334,7 +334,7 @@
ManifestLocation install_source = it.second.install_source();
// Some install sources read a CRX from the filesystem. They can
@@ -230,6 +233,17 @@ std::list<std::string> PendingExtensionM
@@ -229,6 +232,17 @@ std::list<std::string> PendingExtensionM
continue;
}
@@ -354,7 +354,7 @@
--- a/chrome/browser/extensions/updater/extension_updater.cc
+++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -35,7 +35,10 @@
@@ -34,7 +34,10 @@
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
#include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h"
#include "chrome/browser/profiles/profile.h"
@@ -365,7 +365,7 @@
#include "components/update_client/update_query_params.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
@@ -213,9 +216,6 @@ void ExtensionUpdater::EnsureDownloaderC
@@ -212,9 +215,6 @@ void ExtensionUpdater::EnsureDownloaderC
if (!downloader_.get()) {
downloader_ = downloader_factory_.Run(this);
}
@@ -375,7 +375,7 @@
}
void ExtensionUpdater::Start() {
@@ -234,6 +234,15 @@ void ExtensionUpdater::Start() {
@@ -233,6 +233,15 @@ void ExtensionUpdater::Start() {
CheckSoon();
ScheduleNextCheck();
}
@@ -391,7 +391,7 @@
}
void ExtensionUpdater::Stop() {
@@ -360,7 +369,6 @@ void ExtensionUpdater::AddToDownloader(
@@ -359,7 +368,6 @@ void ExtensionUpdater::AddToDownloader(
int request_id,
DownloadFetchPriority fetch_priority,
ExtensionUpdateCheckParams* update_check_params) {
@@ -399,7 +399,7 @@
// In Kiosk mode extensions are downloaded and updated by the ExternalCache.
// Therefore we skip updates here to avoid conflicts.
@@ -468,7 +476,7 @@ void ExtensionUpdater::CheckNow(CheckPar
@@ -467,7 +475,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.
@@ -408,7 +408,7 @@
PendingExtensionManager::Get(profile_);
ExtensionUpdateCheckParams update_check_params;
@@ -602,7 +610,7 @@ void ExtensionUpdater::CheckNow(CheckPar
@@ -601,7 +609,7 @@ void ExtensionUpdater::CheckNow(CheckPar
// OnExtensionDownloadFinished for each extension that was checked.
downloader_->StartAllPending(extension_cache_);
@@ -417,7 +417,7 @@
update_check_params.priority =
params.fetch_priority == DownloadFetchPriority::kBackground
? ExtensionUpdateCheckParams::UpdateCheckPriority::BACKGROUND
@@ -823,6 +831,10 @@ void ExtensionUpdater::CleanUpCrxFileIfN
@@ -822,6 +830,10 @@ void ExtensionUpdater::CleanUpCrxFileIfN
bool ExtensionUpdater::CanUseUpdateService(
const ExtensionId& extension_id) const {
@@ -469,11 +469,10 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "content/public/common/content_switches.h"
@@ -128,6 +130,12 @@ ExtensionManagement::ExtensionManagement
pref_change_registrar_.Add(
pref_names::kExtensionForceInstallWithNonMalwareViolationsEnabled,
pref_change_callback);
+
@@ -126,6 +128,11 @@ ExtensionManagement::ExtensionManagement
pref_change_registrar_.Add(pref_names::kExtensionUnpublishedAvailability,
pref_change_callback);
+ helium::ConfigurePrefChangeRegistrarFor(
+ prefs::kHeliumExtProxyEnabled,
+ pref_change_registrar_,
@@ -482,7 +481,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.
@@ -287,12 +295,20 @@ GURL ExtensionManagement::GetEffectiveUp
@@ -291,12 +298,20 @@ GURL ExtensionManagement::GetEffectiveUp
<< "Update URL cannot be overridden to be the webstore URL!";
return update_url;
}
@@ -45,7 +45,7 @@
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -67,6 +67,11 @@ bool ShouldAccessExtensionService(const
@@ -63,6 +63,11 @@ bool ShouldAccessExtensionService(const
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
}
@@ -57,7 +57,7 @@
bool ShouldFetchBangs(const PrefService& prefs) {
return ShouldAccessServices(prefs) &&
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
@@ -89,6 +94,14 @@ GURL GetWebstoreSnippetURL(const PrefSer
@@ -85,6 +90,14 @@ GURL GetWebstoreSnippetURL(const PrefSer
base::StringPrintf("/ext/cws_snippet?id=%s", id));
}
@@ -96,7 +96,7 @@
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -8266,6 +8266,8 @@ static_library("browser") {
@@ -8255,6 +8255,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
@@ -366,6 +366,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -367,6 +367,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumBangsEnabled] =
settings_api::PrefType::kBoolean;
@@ -118,7 +118,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -219,6 +219,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -217,6 +217,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
@@ -128,7 +128,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
@@ -97,6 +97,13 @@
@@ -92,6 +92,13 @@
label="$i18n{heliumBangsToggle}"
sub-label="$i18n{heliumBangsToggleDescription}">
</settings-toggle-button>
@@ -144,7 +144,7 @@
</template>
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1306,6 +1306,9 @@
@@ -1330,6 +1330,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>
@@ -154,7 +154,7 @@
</if>
</if>
<if expr="is_chromeos">
@@ -2011,6 +2014,12 @@
@@ -2035,6 +2038,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>
@@ -169,7 +169,7 @@
</message>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -1256,7 +1256,7 @@ void AddLanguagesStrings(content::WebUID
@@ -1267,7 +1267,7 @@ void AddLanguagesStrings(content::WebUID
{"languagesDictionaryDownloadError",
IDS_SETTINGS_LANGUAGES_DICTIONARY_DOWNLOAD_FAILED},
{"languagesDictionaryDownloadErrorHelp",
@@ -178,7 +178,7 @@
#endif
#endif // !BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS)
@@ -2163,6 +2163,9 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2208,6 +2208,9 @@ void AddPrivacyStrings(content::WebUIDat
{"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
{"heliumBangsToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
@@ -198,7 +198,7 @@
import("//components/supervised_user/buildflags.gni")
import("//content/public/common/features.gni")
import("//crypto/features.gni")
@@ -102,4 +103,5 @@ chrome_grit_defines = [
@@ -114,4 +115,5 @@ chrome_grit_defines = [
"optimize_webui=$optimize_webui",
"chrome_root_store_cert_management_ui=$chrome_root_store_cert_management_ui",
"use_nss_certs=$use_nss_certs",
@@ -30,7 +30,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
@@ -346,6 +346,10 @@ void ExtensionDownloader::DoStartAllPend
@@ -347,6 +347,10 @@ void ExtensionDownloader::DoStartAllPend
AddToFetches(fetches_preparing, std::move(task));
pending_tasks_.clear();
@@ -56,7 +56,7 @@
case side_panel::customize_chrome::mojom::ActionId::kShowDownloads:
return kActionShowDownloads;
case side_panel::customize_chrome::mojom::ActionId::kClearBrowsingData:
@@ -334,16 +304,8 @@ void CustomizeToolbarHandler::ListAction
@@ -332,16 +302,8 @@ void CustomizeToolbarHandler::ListAction
add_action(kActionNewIncognitoWindow,
side_panel::customize_chrome::mojom::CategoryId::kNavigation);
@@ -73,7 +73,7 @@
add_action(kActionSidePanelShowHistoryCluster,
side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
add_action(kActionShowDownloads,
@@ -357,18 +319,12 @@ void CustomizeToolbarHandler::ListAction
@@ -355,18 +317,12 @@ void CustomizeToolbarHandler::ListAction
}
add_action(kActionPrint,
side_panel::customize_chrome::mojom::CategoryId::kTools);
@@ -0,0 +1,56 @@
--- a/third_party/search_engines_data/resources/definitions/prepopulated_engines.json
+++ b/third_party/search_engines_data/resources/definitions/prepopulated_engines.json
@@ -52,7 +52,7 @@
"bing": {
"name": "Microsoft Bing",
"keyword": "bing.com",
- "favicon_url": "https://www.bing.com/sa/simg/bing_p_rr_teal_min.ico",
+ "favicon_url": "",
"base_builtin_resource_id": "SEARCH_ENGINE_BING",
"logo_url": "https://cdn.sapphire.microsoftapp.net/icons/bing_144.png",
"search_url": "https://www.bing.com/search?q={searchTerms}",
@@ -120,7 +120,7 @@
"duckduckgo": {
"name": "DuckDuckGo",
"keyword": "duckduckgo.com",
- "favicon_url": "https://duckduckgo.com/favicon.ico",
+ "favicon_url": "",
"base_builtin_resource_id": "SEARCH_ENGINE_DUCKDUCKGO",
"logo_url": "https://staticcdn.duckduckgo.com/android/DuckDuckGoLogo.png",
"search_url": "https://duckduckgo.com/?q={searchTerms}",
@@ -139,7 +139,7 @@
"ecosia": {
"name": "Ecosia",
"keyword": "ecosia.org",
- "favicon_url": "https://cdn.ecosia.org/assets/images/ico/favicon.ico",
+ "favicon_url": "",
"base_builtin_resource_id": "SEARCH_ENGINE_ECOSIA",
"logo_url": "https://www.ecosia.org/static/icons/ecosia-logo-app-144x144.png",
"search_url": "https://www.ecosia.org/search?q={searchTerms}",
@@ -173,7 +173,7 @@
"break_stuff_google": {
"name": "Google",
"keyword": "google.com",
- "favicon_url": "https://www.google.com/images/branding/product/ico/googleg_alldp.ico",
+ "favicon_url": "",
"base_builtin_resource_id": "SEARCH_ENGINE_GOOGLE",
"search_url": "https://www.google.com/search?q={searchTerms}",
"suggest_url": "https://www.google.com/complete/search?client=chrome&q={searchTerms}",
@@ -197,7 +197,7 @@
"search_url": "https://kagi.com/search?q={searchTerms}",
"suggest_url": "https://kagisuggest.com/api/autosuggest?q={searchTerms}",
"new_tab_url": "https://kagi.com/",
- "favicon_url": "https://kagi.com/favicon.ico",
+ "favicon_url": "",
"base_builtin_resource_id": "SEARCH_ENGINE_KAGI",
"type": "SEARCH_ENGINE_KAGI",
"id": 115
@@ -339,7 +339,7 @@
"qwant": {
"name": "Qwant",
"keyword": "qwant.com",
- "favicon_url": "https://www.qwant.com/favicon.ico",
+ "favicon_url": "",
"base_builtin_resource_id": "SEARCH_ENGINE_QWANT",
"search_url": "https://www.qwant.com/?q={searchTerms}",
"suggest_url": "https://api.qwant.com/api/suggest/?q={searchTerms}",
@@ -1,6 +1,6 @@
--- 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
@@ -257,7 +257,7 @@ std::unique_ptr<TemplateURLData> GetPrep
const std::vector<const PrepopulatedEngine*>&
regional_prepopulated_engines) {
return FindPrepopulatedEngineInternal(prefs, regional_prepopulated_engines,
@@ -16,7 +16,7 @@
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
#include "components/saved_tab_groups/public/features.h"
@@ -2714,14 +2712,9 @@ void AddSearchStrings(content::WebUIData
@@ -2795,14 +2793,9 @@ void AddSearchStrings(content::WebUIData
html_source->AddString("searchExplanationLearnMoreURL",
chrome::kOmniboxLearnMoreURL);
@@ -0,0 +1,13 @@
--- a/chrome/browser/ui/omnibox/omnibox_view.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view.cc
@@ -135,10 +135,6 @@ ui::ImageModel OmniboxView::GetIcon(int
return ui::ImageModel::FromImage(icon);
}
}
- favicon = turl ? controller()->client()->GetFaviconForKeywordSearchProvider(
- turl, std::move(on_icon_fetched))
- : controller()->client()->GetFaviconForDefaultSearchProvider(
- std::move(on_icon_fetched));
} else if (match.type != AutocompleteMatchType::HISTORY_CLUSTER) {
// The starter pack suggestions are a unique case. These suggestions
@@ -26,7 +26,7 @@
namespace {
const bool kEnableBuiltinSearchProviderAssets =
@@ -1929,18 +1925,6 @@ std::string TemplateURL::GetBuiltinDescr
@@ -1945,18 +1941,6 @@ std::string TemplateURL::GetBuiltinDescr
}
std::optional<std::u16string> TemplateURL::GetBuiltinMarketingSnippet() const {
+13 -13
View File
@@ -1,6 +1,6 @@
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1956,6 +1956,40 @@
@@ -1980,6 +1980,40 @@
<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>
@@ -43,7 +43,7 @@
Google Advanced Protection Program
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2143,6 +2143,23 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2188,6 +2188,23 @@ void AddPrivacyStrings(content::WebUIDat
{"siteSettingsSublabel", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
{"securityPageTitle", IDS_SETTINGS_SECURITY},
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
@@ -113,7 +113,7 @@
private onSecurityPageClick_() {
this.interactedWithPage_();
this.metricsBrowserProxy_.recordAction(
@@ -240,6 +246,10 @@ export class SettingsPrivacyPageElement
@@ -232,6 +238,10 @@ export class SettingsPrivacyPageElement
override getFocusConfig() {
const map = new Map();
@@ -124,7 +124,7 @@
if (routes.COOKIES) {
map.set(routes.COOKIES.path, '#thirdPartyCookiesLinkRow');
}
@@ -267,6 +277,9 @@ export class SettingsPrivacyPageElement
@@ -259,6 +269,9 @@ export class SettingsPrivacyPageElement
override getAssociatedControlFor(childViewId: string): HTMLElement {
let triggerId: string|null = null;
switch (childViewId) {
@@ -157,7 +157,7 @@
if (visibility.safetyHub !== false) {
--- a/chrome/browser/resources/settings/BUILD.gn
+++ b/chrome/browser/resources/settings/BUILD.gn
@@ -155,6 +155,7 @@ build_webui("build") {
@@ -157,6 +157,7 @@ build_webui("build") {
"privacy_page/security/security_page_v2.ts",
"privacy_page/security/security_page.ts",
"privacy_page/security/security_page_feature_row.ts",
@@ -165,7 +165,7 @@
"privacy_sandbox/privacy_sandbox_ad_measurement_subpage.ts",
"privacy_sandbox/privacy_sandbox_fledge_subpage.ts",
"privacy_sandbox/privacy_sandbox_interest_item.ts",
@@ -392,6 +393,7 @@ build_webui("build") {
@@ -396,6 +397,7 @@ build_webui("build") {
"languages_page/languages_util.ts",
"people_page/import_data_browser_proxy.ts",
"people_page/manage_profile_browser_proxy.ts",
@@ -375,7 +375,7 @@
+customElements.define(SettingsHeliumServicesPageElement.is, SettingsHeliumServicesPageElement);
--- a/chrome/browser/resources/settings/lazy_load.ts
+++ b/chrome/browser/resources/settings/lazy_load.ts
@@ -26,6 +26,7 @@ import './privacy_page/privacy_guide/pri
@@ -27,6 +27,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';
@@ -383,7 +383,7 @@
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';
@@ -246,6 +247,7 @@ export {SafeBrowsingSetting} from './pri
@@ -272,6 +273,7 @@ export {SecurityKeysSubpageElement} from
export {HttpsFirstModeSetting, 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';
@@ -401,7 +401,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"
@@ -208,6 +209,13 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -206,6 +207,13 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
@@ -425,7 +425,7 @@
#include "components/language/core/browser/pref_names.h"
#include "components/live_caption/pref_names.h"
#include "components/media_router/common/pref_names.h"
@@ -358,6 +359,12 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -359,6 +360,12 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kString;
#endif
@@ -753,7 +753,7 @@
+#endif // COMPONENTS_HELIUM_SERVICES_SCHEMA_H_
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1298,6 +1298,8 @@ static_library("ui") {
@@ -1301,6 +1301,8 @@ static_library("ui") {
"webui/settings/search_engines_handler.h",
"webui/settings/security_settings_provider.cc",
"webui/settings/security_settings_provider.h",
@@ -825,7 +825,7 @@
+}
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
@@ -77,6 +77,7 @@
@@ -76,6 +76,7 @@
#include "chrome/browser/ui/webui/settings/saved_info_handler.h"
#include "chrome/browser/ui/webui/settings/search_engines_handler.h"
#include "chrome/browser/ui/webui/settings/security_settings_provider.h"
@@ -833,7 +833,7 @@
#include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h"
#include "chrome/browser/ui/webui/settings/settings_localized_strings_provider.h"
#include "chrome/browser/ui/webui/settings/settings_media_devices_selection_handler.h"
@@ -260,6 +261,8 @@ SettingsUI::SettingsUI(content::WebUI* w
@@ -259,6 +260,8 @@ SettingsUI::SettingsUI(content::WebUI* w
AddSettingsPageUIHandler(std::make_unique<ProtocolHandlersHandler>(profile));
AddSettingsPageUIHandler(std::make_unique<PrivacySandboxHandler>());
AddSettingsPageUIHandler(std::make_unique<SearchEnginesHandler>(profile));
@@ -1,6 +1,6 @@
--- a/chrome/app/chromium_strings.grd
+++ b/chrome/app/chromium_strings.grd
@@ -953,6 +953,10 @@ Chromium is unable to recover your setti
@@ -967,6 +967,10 @@ Chromium is unable to recover your setti
Customize and control Chromium. Update is available.
</message>
@@ -11,7 +11,7 @@
<message name="IDS_APPMENU_TOOLTIP_ALERT" desc="The tooltip to show for the browser menu when a non-update alert is displayed">
Customize and control Chromium. Something needs your attention - click for details.
</message>
@@ -1629,6 +1633,11 @@ Chromium is unable to recover your setti
@@ -1659,6 +1663,11 @@ Chromium is unable to recover your setti
Chromium couldn't update to the latest version, so you're missing out on new features and security fixes.
</message>
@@ -25,7 +25,7 @@
Update Chromium
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -13334,6 +13334,9 @@ Check your passwords anytime in <ph name
@@ -13409,6 +13409,9 @@ Check your passwords anytime in <ph name
<message name="IDS_APP_MENU_BUTTON_UPDATE" desc="Short label next to app-menu button when an update is available.">
Update
</message>
@@ -71,7 +71,7 @@
ShowSettingsSubPage(browser, kSearchEnginesSubPage);
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1093,6 +1093,9 @@ bool BrowserCommandController::ExecuteCo
@@ -1095,6 +1095,9 @@ bool BrowserCommandController::ExecuteCo
case IDC_UPGRADE_DIALOG:
OpenUpdateChromeDialog(browser_);
break;
@@ -81,7 +81,7 @@
case IDC_OPEN_SAFETY_HUB:
ShowSettingsSubPage(browser_->GetBrowserForOpeningWebUi(),
chrome::kSafetyHubSubPage);
@@ -1682,6 +1685,7 @@ void BrowserCommandController::InitComma
@@ -1686,6 +1689,7 @@ void BrowserCommandController::InitComma
// These are always enabled; the menu determines their menu item visibility.
command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
+42 -27
View File
@@ -21,16 +21,16 @@
namespace content {
class WebContents;
@@ -56,7 +55,7 @@ class MultiContentsView : public views::
@@ -56,8 +55,6 @@ class MultiContentsView : public views::
double end_width = 0;
};
- static constexpr int kSplitViewContentInset = 8;
+ static constexpr int kSplitViewContentInset = 0;
-
MultiContentsView(BrowserView* browser_view,
std::unique_ptr<MultiContentsViewDelegate> delegate);
@@ -163,10 +162,6 @@ class MultiContentsView : public views::
MultiContentsView(const MultiContentsView&) = delete;
@@ -159,10 +156,6 @@ class MultiContentsView : public views::
return contents_container_views_[1]->contents_view();
}
@@ -41,7 +41,7 @@
MultiContentsBackgroundView* background_view_for_testing() const {
return background_view_;
}
@@ -275,10 +270,6 @@ class MultiContentsView : public views::
@@ -277,10 +270,6 @@ class MultiContentsView : public views::
// Nullopt if not currently resizing.
std::optional<double> initial_start_width_on_resize_;
@@ -73,7 +73,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"
@@ -57,11 +56,7 @@ MultiContentsView::MultiContentsView(
@@ -63,11 +62,7 @@ MultiContentsView::MultiContentsView(
BrowserView* browser_view,
std::unique_ptr<MultiContentsViewDelegate> delegate)
: browser_view_(browser_view),
@@ -86,7 +86,7 @@
SetLayoutManager(std::make_unique<views::DelegatingLayoutManager>(this));
SetProperty(views::kElementIdentifierKey, kMultiContentsViewElementId);
@@ -336,11 +331,8 @@ void MultiContentsView::OnResize(int res
@@ -329,11 +324,8 @@ void MultiContentsView::OnResize(int res
std::make_optional(contents_container_views_[0]->size().width());
}
double total_width = contents_container_views_[0]->size().width() +
@@ -99,7 +99,7 @@
static_cast<double>(resize_amount));
// If end_width is within the snap point widths, update to the snap point.
@@ -449,11 +441,6 @@ views::ProposedLayout MultiContentsView:
@@ -441,11 +433,6 @@ views::ProposedLayout MultiContentsView:
gfx::Rect end_rect(resize_rect.top_right(),
gfx::Size(widths.end_width, available_space.height()));
@@ -111,7 +111,7 @@
layouts.child_layouts.emplace_back(contents_container_views_[0],
contents_container_views_[0]->GetVisible(),
start_rect);
@@ -588,8 +575,10 @@ MultiContentsView::ViewWidths MultiConte
@@ -580,8 +567,10 @@ MultiContentsView::ViewWidths MultiConte
widths.resize_width = resize_area_->GetPreferredSize().width();
widths.start_width =
start_ratio_ * (available_space.width() - widths.resize_width);
@@ -123,7 +123,7 @@
} else {
CHECK(!contents_container_views_[1]->GetVisible());
widths.start_width = available_space.width();
@@ -651,10 +640,6 @@ void MultiContentsView::SetShouldShowTop
@@ -675,10 +664,6 @@ void MultiContentsView::SetShouldShowTop
return;
}
contents_separators_.should_show_top = should_show;
@@ -134,7 +134,7 @@
// This can be called during BrowserView layout, so protect against creating a
// layout loop.
@@ -666,8 +651,6 @@ void MultiContentsView::SetShouldShowLea
@@ -690,8 +675,6 @@ void MultiContentsView::SetShouldShowLea
return;
}
contents_separators_.should_show_leading = should_show;
@@ -143,7 +143,7 @@
// This can be called during BrowserView layout, so protect against creating a
// layout loop.
@@ -679,8 +662,6 @@ void MultiContentsView::SetShouldShowTra
@@ -703,8 +686,6 @@ void MultiContentsView::SetShouldShowTra
return;
}
contents_separators_.should_show_trailing = should_show;
@@ -162,7 +162,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"
@@ -54,10 +53,6 @@
@@ -55,10 +54,6 @@
#endif
namespace {
@@ -173,22 +173,20 @@
constexpr int kNewTabFooterSeparatorHeight = 1;
constexpr int kNewTabFooterHeight = 56;
} // namespace
@@ -133,14 +128,6 @@ ContentsContainerView::ContentsContainer
@@ -134,12 +129,6 @@ ContentsContainerView::ContentsContainer
}
#endif
- if (base::FeatureList::IsEnabled(features::kSideBySide)) {
- mini_toolbar_ = AddChildView(std::make_unique<MultiContentsViewMiniToolbar>(
- browser_view, contents_view_));
- mini_toolbar_ = AddChildView(std::make_unique<MultiContentsViewMiniToolbar>(
- browser_view, contents_view_));
-
- container_outline_ =
- AddChildView(std::make_unique<ContentsContainerOutline>(mini_toolbar_));
- }
- container_outline_ =
- AddChildView(std::make_unique<ContentsContainerOutline>(mini_toolbar_));
-
view_bounds_observer_.Observe(contents_view_);
}
@@ -163,120 +150,11 @@ std::vector<views::View*> ContentsContai
@@ -162,130 +151,11 @@ std::vector<views::View*> ContentsContai
void ContentsContainerView::UpdateBorderAndOverlay(bool is_in_split,
bool is_active,
bool is_highlighted) {
@@ -201,6 +199,11 @@
- ClearBorderRoundedCorners();
- mini_toolbar_->SetVisible(false);
- container_outline_->SetVisible(false);
- if (capture_contents_border_widget_) {
- static_cast<ContentsCaptureBorderView*>(
- capture_contents_border_widget_->GetContentsView())
- ->SetIsInSplit(false);
- }
- return;
- }
-
@@ -212,6 +215,11 @@
- // Mini toolbar should only be visible for the inactive contents
- // container view or both depending on configuration.
- mini_toolbar_->UpdateState(is_active, is_highlighted);
- if (capture_contents_border_widget_) {
- static_cast<ContentsCaptureBorderView*>(
- capture_contents_border_widget_->GetContentsView())
- ->SetIsInSplit(true);
- }
-}
-
-void ContentsContainerView::UpdateBorderRoundedCorners() {
@@ -311,7 +319,7 @@
}
void ContentsContainerView::Layout(PassKey pass_key) {
@@ -290,9 +168,6 @@ void ContentsContainerView::Layout(PassK
@@ -299,9 +169,6 @@ void ContentsContainerView::Layout(PassK
void ContentsContainerView::OnViewBoundsChanged(View* observed_view) {
if (observed_view == contents_view_) {
UpdateDevToolsDockedPlacement();
@@ -321,7 +329,16 @@
}
}
@@ -559,30 +434,6 @@ views::ProposedLayout ContentsContainerV
@@ -414,7 +281,7 @@ void ContentsContainerView::CreateCaptur
capture_contents_border_widget_->Init(std::move(params));
auto contents_capture_border_view =
- std::make_unique<ContentsCaptureBorderView>(mini_toolbar_);
+ std::make_unique<ContentsCaptureBorderView>(nullptr);
capture_contents_border_widget_->SetContentsView(
std::move(contents_capture_border_view));
capture_contents_border_widget_->SetVisibilityChangedAnimationsEnabled(false);
@@ -568,30 +435,6 @@ views::ProposedLayout ContentsContainerV
non_devtools_contents_bounds, size_bounds);
}
@@ -445,7 +462,7 @@
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -143,7 +143,6 @@
@@ -148,7 +148,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"
@@ -453,16 +470,14 @@
#include "chrome/browser/ui/views/frame/scrim_view.h"
#include "chrome/browser/ui/views/frame/shadow_overlay_view.h"
#include "chrome/browser/ui/views/frame/tab_modal_dialog_host.h"
@@ -2322,12 +2321,6 @@ void BrowserView::UpdateToolbar(content:
@@ -2345,10 +2344,6 @@ void BrowserView::UpdateToolbar(content:
if (toolbar_) {
toolbar_->Update(contents);
}
- if (multi_contents_view_) {
- for (ContentsContainerView* contents_container :
- multi_contents_view_->contents_container_views()) {
- contents_container->mini_toolbar()->UpdateContents();
- }
- }
}
bool BrowserView::UpdateToolbarSecurityState() {
@@ -1,6 +1,6 @@
--- a/components/embedder_support/user_agent_utils.cc
+++ b/components/embedder_support/user_agent_utils.cc
@@ -205,17 +205,12 @@ const blink::UserAgentBrandList GetUserA
@@ -187,17 +187,12 @@ const blink::UserAgentBrandList GetUserA
int major_version_number;
bool parse_result = base::StringToInt(major_version, &major_version_number);
DCHECK(parse_result);
+6 -6
View File
@@ -1,6 +1,6 @@
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1312,6 +1312,10 @@ inline constexpr char
@@ -1309,6 +1309,10 @@ inline constexpr char
// instead of tab strip end.
inline constexpr char kNewTabNextToActive[] = "helium.browser.new_tab_next_to_active";
@@ -24,7 +24,7 @@
registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1764,11 +1764,11 @@ void TabStripModel::CloseSelectedTabs()
@@ -1835,11 +1835,11 @@ void TabStripModel::CloseSelectedTabs()
}
void TabStripModel::SelectNextTab(TabStripUserGestureDetails detail) {
@@ -38,7 +38,7 @@
}
void TabStripModel::SelectLastTab(TabStripUserGestureDetails detail) {
@@ -3817,6 +3817,18 @@ TabStripSelectionChange TabStripModel::S
@@ -4042,6 +4042,18 @@ TabStripSelectionChange TabStripModel::S
return selection;
}
@@ -59,7 +59,7 @@
if (mru_cycle_list_.empty()) {
--- a/chrome/browser/ui/tabs/tab_strip_model.h
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -1172,6 +1172,11 @@ class TabStripModel {
@@ -1187,6 +1187,11 @@ class TabStripModel {
kPrevious,
};
@@ -73,7 +73,7 @@
void SelectMRUTab(TabRelativeDirection direction,
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -230,6 +230,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -229,6 +229,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
(*s_allowlist)[::prefs::kNewTabNextToActive] =
settings_api::PrefType::kBoolean;
@@ -96,7 +96,7 @@
</message>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -520,6 +520,7 @@ void AddAppearanceStrings(content::WebUI
@@ -523,6 +523,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},
@@ -1,6 +1,6 @@
--- a/components/helium_services/helium_services_helpers.cc
+++ b/components/helium_services/helium_services_helpers.cc
@@ -88,6 +88,11 @@ bool ShouldAccessUpdateService(const Pre
@@ -84,6 +84,11 @@ bool ShouldAccessUpdateService(const Pre
prefs.GetBoolean(prefs::kHeliumUpdateFetchingEnabled);
}
@@ -12,7 +12,7 @@
GURL GetExtensionUpdateURL(const PrefService& prefs) {
if (!ShouldAccessExtensionService(prefs)) {
return GetDummyURL();
@@ -127,6 +132,14 @@ GURL GetBrowserUpdateURL(const PrefServi
@@ -123,6 +128,14 @@ GURL GetBrowserUpdateURL(const PrefServi
#endif
}
@@ -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
@@ -370,6 +370,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -371,6 +371,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumUpdateFetchingEnabled] =
settings_api::PrefType::kBoolean;
@@ -68,7 +68,7 @@
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -224,6 +224,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -222,6 +222,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
@@ -86,7 +86,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
@@ -70,6 +71,9 @@
@@ -69,6 +70,9 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/crx_file/id_util.h"
@@ -170,7 +170,7 @@
"//content/public/browser",
--- a/extensions/browser/api/storage/storage_frontend.cc
+++ b/extensions/browser/api/storage/storage_frontend.cc
@@ -20,6 +20,8 @@
@@ -19,6 +19,8 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
@@ -179,7 +179,7 @@
#include "components/value_store/value_store_factory.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -217,6 +219,24 @@ void StorageFrontend::OnReadFinished(
@@ -216,6 +218,24 @@ void StorageFrontend::OnReadFinished(
if (success) {
get_result.data = result.PassSettings();
@@ -217,7 +217,7 @@
if ( bin.assetSourceRegistry instanceof Object ) {
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2033,6 +2033,12 @@
@@ -2057,6 +2057,12 @@
Helium will automatically download and install browser and component updates as they become available. We recommend keeping this setting enabled to ensure you get the latest features and security updates. Automatic core browser updates are not available on this platform yet, but component updates are. Please use external software to keep Helium up to date.
</message>
</if>
@@ -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
@@ -109,6 +109,11 @@
@@ -104,6 +104,11 @@
label="$i18n{heliumUpdatesToggle}"
sub-label="$i18n{heliumUpdatesToggleDescription}">
</settings-toggle-button>
@@ -246,7 +246,7 @@
</template>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2170,6 +2170,10 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2215,6 +2215,10 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
{"heliumUpdatesToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION},
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/components/helium_services/extension_ids.h
@@ -0,0 +1,18 @@
@@ -0,0 +1,22 @@
+// 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.
@@ -16,6 +16,10 @@
+inline constexpr char kUBlockOriginComponentId[] =
+ "blockjmkbacgjkknlgpkjjiijinjdanf";
+
+inline constexpr char kUblockOriginComponentIdHashed[] =
+ // SHA1(kUBlockOriginComponentId)
+ "70C2895ED505C532A80761F0928B821B103D0786";
+
+} // namespace helium
+
+#endif /* COMPONENTS_HELIUM_SERVICES_EXTENSION_IDS_H_ */
@@ -31,7 +35,7 @@
void AddChromeApp();
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -58,6 +58,7 @@
@@ -57,6 +57,7 @@
#include "ui/accessibility/accessibility_features.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -39,7 +43,7 @@
#if BUILDFLAG(IS_CHROMEOS)
#include "ash/constants/ash_features.h"
@@ -430,6 +431,21 @@ void ComponentLoader::AddWebStoreApp() {
@@ -429,6 +430,21 @@ void ComponentLoader::AddWebStoreApp() {
l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION));
}
@@ -61,7 +65,7 @@
#if BUILDFLAG(IS_CHROMEOS)
void ComponentLoader::AddChromeApp() {
AddWithNameAndDescription(
@@ -507,6 +523,7 @@ void ComponentLoader::AddDefaultComponen
@@ -506,6 +522,7 @@ void ComponentLoader::AddDefaultComponen
if (!skip_session_components) {
AddWebStoreApp();
@@ -1,129 +0,0 @@
--- a/chrome/browser/extensions/chrome_extension_registrar_delegate.cc
+++ b/chrome/browser/extensions/chrome_extension_registrar_delegate.cc
@@ -12,6 +12,7 @@
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/notimplemented.h"
+#include "base/task/thread_pool.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/corrupted_extension_reinstaller.h"
#include "chrome/browser/extensions/data_deleter.h"
@@ -30,6 +31,9 @@
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/common/webui_url_constants.h"
#include "components/favicon_base/favicon_url_parser.h"
+#include "components/helium_services/extension_ids.h"
+#include "components/value_store/value_store.h"
+#include "extensions/browser/api/storage/storage_frontend.h"
#include "extensions/browser/delayed_install_manager.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/browser/extension_file_task_runner.h"
@@ -254,7 +258,85 @@ void ChromeExtensionRegistrarDelegate::P
}
}
- DataDeleter::StartDeleting(profile_, extension.get(), subtask_done_callback);
+ ChromeExtensionRegistrarDelegate::MaybeMigrateUBlockPrefs(
+ extension, base::BindOnce([](Profile* profile,
+ scoped_refptr<const Extension> extension,
+ base::OnceClosure cb) {
+ content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
+ base::BindOnce(&DataDeleter::StartDeleting,
+ profile, base::RetainedRef(extension),
+ std::move(cb)));
+ }, profile_, extension, std::move(subtask_done_callback)));
+}
+
+void ChromeExtensionRegistrarDelegate::MaybeMigrateUBlockPrefs(
+ scoped_refptr<const Extension> extension,
+ base::OnceClosure callback) {
+ StorageFrontend* frontend = StorageFrontend::Get(profile_);
+ scoped_refptr<const Extension> component = registry_->GetExtensionById(
+ helium::kUBlockOriginComponentId, ExtensionRegistry::EVERYTHING);
+
+ if (!frontend || extension->id() != helium::kUBlockOriginWebstoreId || !component) {
+ if (!component) {
+ LOG(ERROR) << "component-based ublock is missing, skipping migration";
+ }
+ std::move(callback).Run();
+ return;
+ }
+
+ std::array namespaces = { settings_namespace::LOCAL,
+ settings_namespace::SYNC };
+ base::RepeatingClosure barrier_cb =
+ base::BarrierClosure(namespaces.size(), std::move(callback));
+
+ for (settings_namespace::Namespace ns : namespaces) {
+ ValueStoreCache* store_cache = frontend->GetValueStoreCache(ns);
+ if (!store_cache) {
+ continue;
+ }
+
+ GetExtensionFileTaskRunner()->PostTask(FROM_HERE,
+ base::BindOnce(
+ &ValueStoreCache::RunWithValueStoreForExtension,
+ base::Unretained(store_cache),
+ base::BindOnce([] (base::WeakPtr<ChromeExtensionRegistrarDelegate> weak_ptr,
+ scoped_refptr<const Extension> component,
+ ValueStoreCache* store_cache,
+ base::RepeatingClosure cb,
+ value_store::ValueStore* old) {
+ store_cache->RunWithValueStoreForExtension(
+ base::BindOnce(
+ &ChromeExtensionRegistrarDelegate::HandleUblockPrefsMigration,
+ weak_ptr, old).Then(std::move(cb)), component);
+ }, weak_factory_.GetWeakPtr(), component, store_cache, barrier_cb),
+ extension));
+ }
+}
+
+void ChromeExtensionRegistrarDelegate::HandleUblockPrefsMigration(
+ value_store::ValueStore* old_, value_store::ValueStore* new_) {
+ if (!old_ || !new_) {
+ LOG(ERROR) << "missing old/new";
+ return;
+ }
+
+ auto oldValues = old_->Get();
+ if (!oldValues.status().ok()) {
+ LOG(ERROR) << "failed getting webstore uBlock prefs";
+ return;
+ }
+
+ auto getKeysResult = new_->GetKeys();
+ CHECK(getKeysResult.status().ok());
+
+ auto existingKeys = getKeysResult.PassSettings();
+ for (const auto [ key, value ] : oldValues.PassSettings()) {
+ if (existingKeys.Find(key)) {
+ continue;
+ }
+
+ new_->Set(value_store::ValueStore::DEFAULTS, key, value);
+ }
}
void ChromeExtensionRegistrarDelegate::DoLoadExtensionForReload(
--- a/chrome/browser/extensions/chrome_extension_registrar_delegate.h
+++ b/chrome/browser/extensions/chrome_extension_registrar_delegate.h
@@ -7,6 +7,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "components/value_store/value_store.h"
#include "extensions/browser/extension_registrar.h"
#include "extensions/buildflags/buildflags.h"
@@ -51,6 +52,11 @@ class ChromeExtensionRegistrarDelegate :
void PreUninstallExtension(scoped_refptr<const Extension> extension) override;
void PostUninstallExtension(scoped_refptr<const Extension> extension,
base::OnceClosure done_callback) override;
+ void MaybeMigrateUBlockPrefs(scoped_refptr<const Extension> extension,
+ base::OnceClosure callback);
+ void HandleUblockPrefsMigration(value_store::ValueStore* old_,
+ value_store::ValueStore* new_);
+
void LoadExtensionForReload(const ExtensionId& extension_id,
const base::FilePath& path) override;
void LoadExtensionForReloadWithQuietFailure(
@@ -8,20 +8,24 @@
namespace extensions {
struct InstallWarning;
@@ -104,6 +105,10 @@ class Manifest final {
@@ -104,6 +105,14 @@ class Manifest final {
location == mojom::ManifestLocation::kExternalComponent;
}
+ static inline bool IsUBlockComponent(std::string_view extension_id) {
+ return extension_id == helium::kUBlockOriginComponentId;
+ }
+
+ static inline bool IsUblockComponentHashed(const HashedExtensionId& id) {
+ return id.value() == helium::kUblockOriginComponentIdHashed;
+ }
+
static inline bool IsValidLocation(mojom::ManifestLocation location) {
return location > mojom::ManifestLocation::kInvalidLocation &&
location <= mojom::ManifestLocation::kMaxValue;
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -6223,7 +6223,8 @@ void AddChromeSchemeFactories(
@@ -6215,7 +6215,8 @@ void AddChromeSchemeFactories(
std::vector<std::string> allowed_webui_hosts;
// Support for chrome:// scheme if appropriate.
if ((extension->is_extension() || extension->is_platform_app()) &&
@@ -33,7 +37,7 @@
allowed_webui_hosts.emplace_back(content::kChromeUIResourcesHost);
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
@@ -156,8 +156,11 @@ void AppInfoSummaryPanel::AddDescription
@@ -167,8 +167,11 @@ void AppInfoSummaryPanel::AddDescription
}
void AppInfoSummaryPanel::AddDetailsControl(views::View* vertical_stack) {
@@ -205,7 +209,7 @@
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterListPref(pref_names::kDeletedComponentExtensions);
registry->RegisterDictionaryPref(kExtensionsBlocklistUpdate);
@@ -2306,14 +2318,14 @@ bool ExtensionPrefs::GetUserExtensionPre
@@ -2302,14 +2314,14 @@ bool ExtensionPrefs::GetUserExtensionPre
ExtensionIdContainer* id_container_out) const {
DCHECK(id_container_out->empty());
@@ -223,3 +227,13 @@
if (!entry.is_string()) {
NOTREACHED();
}
--- a/extensions/common/features/simple_feature.cc
+++ b/extensions/common/features/simple_feature.cc
@@ -698,6 +698,7 @@ Feature::Availability SimpleFeature::Get
// Component extensions can access any feature.
// NOTE: Deliberately does not match EXTERNAL_COMPONENT.
if (component_extensions_auto_granted_ &&
+ !Manifest::IsUblockComponentHashed(hashed_id) &&
location == ManifestLocation::kComponent)
return CreateAvailability(AvailabilityResult::kIsAvailable);
+137 -28
View File
@@ -104,7 +104,7 @@
},
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -599,6 +599,7 @@ source_set("extensions") {
@@ -602,6 +602,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
@@ -25,6 +25,7 @@
@@ -24,6 +24,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"
@@ -95,6 +96,7 @@ ChromeComponentExtensionResourceManager:
@@ -94,6 +95,7 @@ ChromeComponentExtensionResourceManager:
AddComponentResourceEntries(kComponentExtensionResources);
AddComponentResourceEntries(kExtraComponentExtensionResources);
@@ -150,30 +150,25 @@
// Add Files app JS modules resources.
--- a/third_party/ublock/manifest.json
+++ b/third_party/ublock/manifest.json
@@ -115,5 +115,5 @@
@@ -114,5 +114,6 @@
"version": "1.69.0",
"web_accessible_resources": [
"/web_accessible_resources/*"
],
- "update_url": "https://raw.githubusercontent.com/imputnet/ublock-origin-crx/refs/heads/main/update.xml"
-}
\ No newline at end of file
- ]
+ ],
+ "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyqQYDhKkM6NlQjOgb11DpHQHsqvK4IMPDIDhvmR47JDGOrf/UyI6+wmx9MfMuqzUBFigip+57UUr+mWoWtI4eNga1zKb8wEphTDmm0Oo0NHInSlN5t8FmUEPjJ0WVf+CiwA3ucf32OAe+1akOLtMAgHqe4jax7k/b69miKDz3gvi7lEPmP+H4XDoQ3dOSgEHyjyP4Nf7QgPPrvK2zkB+8q17T0w2bTApETDDkr45K563pxBqb7i9JmYPP+sXQEB8qDevA5BlPAYBAINFZPOO+SOPpMUguOSA/eb1mjNcfLMGwJs1Zn5ejxqT3RgceqjrN86AgpQvCVeqFtcal/LZFwIDAQAB"
+}
}
--- a/third_party/ublock/assets/assets.json
+++ b/third_party/ublock/assets/assets.json
@@ -3,10 +3,9 @@
@@ -3,7 +3,6 @@
"content": "internal",
"updateAfter": 13,
"contentURL": [
- "https://raw.githubusercontent.com/gorhill/uBlock/master/assets/assets.json",
- "https://raw.githubusercontent.com/imputnet/uBlock/refs/heads/main/assets/assets.json",
"assets/assets.json"
],
- "cdnURLs": [
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/ublock/assets.json",
"https://ublockorigin.pages.dev/ublock/assets.json",
"https://cdn.jsdelivr.net/gh/gorhill/uBlock@master/assets/assets.json",
@@ -17,7 +16,6 @@
]
},
@@ -11,7 +10,6 @@
"content": "internal",
"updateAfter": 19,
"contentURL": [
@@ -181,7 +176,7 @@
"assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat"
]
},
@@ -25,10 +23,9 @@
@@ -19,10 +17,9 @@
"content": "internal",
"updateAfter": 29,
"contentURL": [
@@ -193,7 +188,23 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/badlists.txt",
"https://ublockorigin.pages.dev/filters/badlists.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/filters/badlists.txt",
@@ -42,17 +39,16 @@
@@ -36,7 +33,6 @@
"title": "Helium filters – Annoyances",
"tags": "annoyances",
"contentURL": [
- "https://raw.githubusercontent.com/imputnet/helium-services/main/filters/helium-annoyances.txt",
"assets/helium/annoyances.txt"
]
},
@@ -46,7 +42,6 @@
"parent": "Helium filters",
"title": "Helium filters – Unbreak",
"contentURL": [
- "https://raw.githubusercontent.com/imputnet/helium-services/main/filters/helium-unbreak.txt",
"assets/helium/unbreak.txt"
]
},
@@ -57,17 +52,16 @@
"title": "uBlock filters – Ads",
"tags": "ads",
"contentURL": [
@@ -213,7 +224,7 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -65,17 +61,16 @@
@@ -80,17 +74,16 @@
"title": "uBlock filters – Badware risks",
"tags": "malware security",
"contentURL": [
@@ -233,7 +244,7 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -89,17 +84,16 @@
@@ -104,17 +97,16 @@
"title": "uBlock filters – Privacy",
"tags": "privacy",
"contentURL": [
@@ -253,7 +264,7 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -111,17 +105,16 @@
@@ -126,17 +118,16 @@
"parent": "uBlock filters",
"title": "uBlock filters – Unbreak",
"contentURL": [
@@ -273,7 +284,7 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -133,17 +126,16 @@
@@ -148,17 +139,16 @@
"parent": "uBlock filters",
"title": "uBlock filters – Quick fixes",
"contentURL": [
@@ -293,7 +304,16 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -193,15 +185,14 @@
@@ -187,7 +177,7 @@
"group": "ads",
"title": "AdGuard – Ads",
"tags": "ads",
- "contentURL": "https://filters.adtidy.org/extension/ublock/filters/2_without_easylist.txt",
+ "contentURL": [],
"supportURL": "https://github.com/AdguardTeam/AdguardFilters#adguard-filters"
},
"adguard-mobile": {
@@ -207,15 +197,14 @@
"tags": "ads",
"preferred": true,
"contentURL": [
@@ -311,7 +331,18 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -238,15 +229,14 @@
@@ -226,8 +215,8 @@
"group": "privacy",
"title": "AdGuard/uBO – URL Tracking Protection",
"tags": "privacy",
- "contentURL": "https://ublockorigin.github.io/uAssets/filters/privacy-removeparam.txt",
- "cdnURLs": [
+ "contentURL": [],
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/filters/privacy-removeparam.txt",
"https://ublockorigin.pages.dev/filters/privacy-removeparam.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/filters/privacy-removeparam.txt",
@@ -257,15 +246,14 @@
"tags": "privacy",
"preferred": true,
"contentURL": [
@@ -329,7 +360,7 @@
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -257,10 +247,9 @@
@@ -276,10 +264,9 @@
"group": "malware",
"title": "Online Malicious URL Blocklist",
"contentURL": [
@@ -341,7 +372,85 @@
"https://curbengh.github.io/malware-filter/urlhaus-filter-ag-online.txt",
"https://malware-filter.gitlab.io/urlhaus-filter/urlhaus-filter-ag-online.txt",
"https://malware-filter.pages.dev/urlhaus-filter-ag-online.txt"
@@ -540,7 +529,6 @@
@@ -306,7 +293,7 @@
"parent": "AdGuard/uBO – Cookie Notices",
"title": "AdGuard – Cookie Notices",
"tags": "annoyances cookies",
- "contentURL": "https://filters.adtidy.org/extension/ublock/filters/18.txt",
+ "contentURL": [],
"supportURL": "https://github.com/AdguardTeam/AdguardFilters#adguard-filters"
},
"ublock-cookies-adguard": {
@@ -334,11 +321,8 @@
"title": "EasyList – Cookie Notices",
"tags": "annoyances cookies",
"preferred": true,
- "contentURL": [
- "https://ublockorigin.github.io/uAssets/thirdparties/easylist-cookies.txt",
- "https://secure.fanboy.co.nz/fanboy-cookiemonster_ubo.txt"
- ],
- "cdnURLs": [
+ "contentURL": [],
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/thirdparties/easylist-cookies.txt",
"https://ublockorigin.pages.dev/thirdparties/easylist-cookies.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/thirdparties/easylist-cookies.txt",
@@ -355,8 +339,8 @@
"title": "uBlock filters – Cookie Notices",
"tags": "annoyances cookies",
"preferred": true,
- "contentURL": "https://ublockorigin.github.io/uAssets/filters/annoyances-cookies.txt",
- "cdnURLs": [
+ "contentURL": [],
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/filters/annoyances-cookies.txt",
"https://ublockorigin.pages.dev/filters/annoyances-cookies.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/filters/annoyances-cookies.txt",
@@ -505,10 +489,8 @@
"title": "EasyList – Newsletter Notices",
"tags": "annoyances",
"preferred": true,
- "contentURL": [
- "https://ublockorigin.github.io/uAssets/thirdparties/easylist-newsletters.txt"
- ],
- "cdnURLs": [
+ "contentURL": [],
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/thirdparties/easylist-newsletters.txt",
"https://ublockorigin.pages.dev/thirdparties/easylist-newsletters.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/thirdparties/easylist-newsletters.txt",
@@ -523,10 +505,8 @@
"title": "EasyList – Notifications",
"tags": "annoyances",
"preferred": true,
- "contentURL": [
- "https://ublockorigin.github.io/uAssets/thirdparties/easylist-notifications.txt"
- ],
- "cdnURLs": [
+ "contentURL": [],
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/thirdparties/easylist-notifications.txt",
"https://ublockorigin.pages.dev/thirdparties/easylist-notifications.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/thirdparties/easylist-notifications.txt",
@@ -539,14 +519,14 @@
"group": "annoyances",
"title": "uBlock filters – Annoyances",
"tags": "annoyances",
- "contentURL": "https://ublockorigin.github.io/uAssets/filters/annoyances.txt",
- "cdnURLs": [
+ "contentURL": [],
+ "^cdnURLs": [
"https://ublockorigin.github.io/uAssetsCDN/filters/annoyances.min.txt",
"https://ublockorigin.pages.dev/filters/annoyances.min.txt",
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/filters/annoyances.min.txt",
"https://cdn.statically.io/gh/uBlockOrigin/uAssetsCDN/main/filters/annoyances.min.txt"
],
- "patchURLs": [
+ "^patchURLs": [
"https://ublockorigin.github.io/uAssetsCDN/filters/",
"https://ublockorigin.pages.dev/filters/"
],
@@ -570,7 +550,6 @@
"tags": "ads privacy security",
"preferred": true,
"contentURL": [
@@ -9,7 +9,7 @@
#if defined(USE_AURA)
registry->RegisterBooleanPref(prefs::kOverscrollHistoryNavigationEnabled,
@@ -157,7 +157,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -155,7 +155,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.
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -149,7 +149,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -147,7 +147,7 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
+2 -2
View File
@@ -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
@@ -386,6 +386,10 @@ void ProfilePolicyConnector::Init(
@@ -393,6 +393,10 @@ void ProfilePolicyConnector::Init(
if (connector->command_line_policy_provider()) {
policy_providers_.push_back(connector->command_line_policy_provider());
}
@@ -207,7 +207,7 @@
inline constexpr char kIdKey[] = "id";
--- a/components/policy_strings.grdp
+++ b/components/policy_strings.grdp
@@ -690,6 +690,9 @@ Additional details:
@@ -705,6 +705,9 @@ Additional details:
<message name="IDS_POLICY_SOURCE_RESTRICTED_MANAGED_GUEST_SESSION_OVERRIDE" desc="Indicates that the policy originates from the restricted managed guest session override.">
Restricted managed guest session override
</message>
@@ -0,0 +1,183 @@
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2469,6 +2469,9 @@
<message name="IDS_SETTINGS_SEARCH_ENGINES_ADD_SITE_SEARCH" desc="Title for a dialog that allows adding a new site search engine.">
Add site search
</message>
+ <message name="IDS_SETTINGS_SEARCH_ENGINES_ADD_SEARCH_ENGINE" desc="Title for a dialog that allows adding a new search engine.">
+ Add search engine
+ </message>
<message name="IDS_SETTINGS_SEARCH_ENGINES_EDIT_SEARCH_ENGINE" desc="Title for a dialog that allows editing an existing search engine.">
Edit search engine
</message>
--- a/components/components_strings.grd
+++ b/components/components_strings.grd
@@ -391,6 +391,9 @@
<message name="IDS_ADD" desc="Used for Add on buttons">
Add
</message>
+ <message name="IDS_ADD_AS_DEFAULT" desc="Used on a button to add information and then set it as default.">
+ Add as default
+ </message>
<message name="IDS_MOVE" desc="Used for Move on buttons" formatter_data="android_java">
Move
</message>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -175,6 +175,7 @@ namespace {
void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"add", IDS_ADD},
+ {"addAsDefault", IDS_ADD_AS_DEFAULT},
{"advancedPageTitle", IDS_SETTINGS_ADVANCED},
{"back", IDS_ACCNAME_BACK},
{"basicPageTitle", IDS_SETTINGS_BASIC},
@@ -2828,6 +2829,8 @@ void AddSearchEnginesStrings(content::We
IDS_SETTINGS_SEARCH_ENGINES_PAGE_EXPLANATION},
{"searchEnginesAddSiteSearch",
IDS_SETTINGS_SEARCH_ENGINES_ADD_SITE_SEARCH},
+ {"searchEnginesAddSearchEngine",
+ IDS_SETTINGS_SEARCH_ENGINES_ADD_SEARCH_ENGINE},
{"searchEnginesEditSearchEngine",
IDS_SETTINGS_SEARCH_ENGINES_EDIT_SEARCH_ENGINE},
{"searchEnginesViewSearchEngine",
--- a/chrome/browser/resources/settings/search_page/search_engine_edit_dialog.ts
+++ b/chrome/browser/resources/settings/search_page/search_engine_edit_dialog.ts
@@ -21,7 +21,7 @@ import {loadTimeData} from '../i18n_setu
import {getTemplate} from './search_engine_edit_dialog.html.js';
import type {SearchEngine, SearchEnginesBrowserProxy, SearchEnginesInfo} from './search_engines_browser_proxy.js';
-import {SearchEnginesBrowserProxyImpl} from './search_engines_browser_proxy.js';
+import {ChoiceMadeLocation, SearchEnginesBrowserProxyImpl} from './search_engines_browser_proxy.js';
/**
* The |modelIndex| to use when a new search engine is added. Must match
@@ -62,6 +62,7 @@ export class SettingsSearchEngineEditDia
* should be added.
*/
model: Object,
+ isNewPrimary: Boolean,
searchEngine_: String,
keyword_: String,
@@ -79,6 +80,7 @@ export class SettingsSearchEngineEditDia
}
declare model: SearchEngine|null;
+ declare isNewPrimary: boolean;
declare private searchEngine_: string;
declare private keyword_: string;
declare private queryUrl_: string;
@@ -116,8 +118,10 @@ export class SettingsSearchEngineEditDia
this.queryUrl_ = this.model.url;
this.suggestionsUrl_ = this.model.suggestionsUrl;
} else {
- this.dialogTitle_ = loadTimeData.getString('searchEnginesAddSiteSearch');
- this.actionButtonText_ = loadTimeData.getString('add');
+ this.dialogTitle_ = loadTimeData.getString(
+ this.isNewPrimary ? 'searchEnginesAddSearchEngine' : 'searchEnginesAddSiteSearch');
+ this.actionButtonText_ = loadTimeData.getString(
+ this.isNewPrimary ? 'addAsDefault' : 'add');
this.readonly_ = false;
this.showPolicySubtitle_ = false;
}
@@ -167,7 +171,28 @@ export class SettingsSearchEngineEditDia
this.browserProxy_.searchEngineEditCompleted(
this.searchEngine_, this.keyword_, this.queryUrl_,
this.suggestionsUrl_);
- this.$.dialog.close();
+ const done = () => this.$.dialog.close();
+ if (!this.isNewPrimary) {
+ return done();
+ }
+
+ this.browserProxy_.getSearchEnginesList()
+ .then(engines => {
+ const engine = engines.actives.find(
+ e => e.keyword === this.keyword_
+ );
+
+ if (!engine) {
+ return;
+ }
+
+ this.browserProxy_.setDefaultSearchEngine(
+ engine.modelIndex,
+ ChoiceMadeLocation.SEARCH_ENGINE_SETTINGS,
+ null
+ );
+ })
+ .finally(done);
}
private validateElement_(inputElement: CrInputElement) {
--- a/chrome/browser/resources/settings/search_page/search_engines_page.html
+++ b/chrome/browser/resources/settings/search_page/search_engines_page.html
@@ -47,6 +47,11 @@
$i18n{searchEnginesSearchEnginesExplanation}
</div>
</div>
+ <cr-button class="secondary-button header-aligned-button"
+ aria-label="$i18n{searchEnginesAddButtonAriaLabel}"
+ on-click="onAddPrimarySearchEngineClick_" id="addPrimarySearchEngine">
+ $i18n{add}
+ </cr-button>
</div>
<settings-search-engines-list hidden="[[!matchingDefaultEngines_.length]]"
engines="[[matchingDefaultEngines_]]" show-shortcut>
@@ -59,6 +64,7 @@
<template is="dom-if" if="[[showEditDialog_]]" restamp>
<settings-search-engine-edit-dialog model="[[dialogModel_]]"
+ is-new-primary="[[isNewPrimary_]]"
on-close="onCloseEditDialog_">
</settings-search-engine-edit-dialog>
</template>
--- a/chrome/browser/resources/settings/search_page/search_engines_page.ts
+++ b/chrome/browser/resources/settings/search_page/search_engines_page.ts
@@ -135,6 +135,11 @@ export class SettingsSearchEnginesPageEl
value: null,
},
+ isNewPrimary_: {
+ type: Boolean,
+ value: false,
+ },
+
showEditDialog_: {
type: Boolean,
value: false,
@@ -167,6 +172,7 @@ export class SettingsSearchEnginesPageEl
declare private omniboxExtensionListBlurred_: boolean;
declare private dialogModel_: SearchEngine|null;
declare private dialogAnchorElement_: HTMLElement|null;
+ declare private isNewPrimary_: boolean;
declare private showEditDialog_: boolean;
declare private showDeleteConfirmationDialog_: boolean;
private browserProxy_: SearchEnginesBrowserProxy =
@@ -190,9 +196,11 @@ export class SettingsSearchEnginesPageEl
}
private openEditDialog_(
- searchEngine: SearchEngine|null, anchorElement: HTMLElement) {
+ searchEngine: SearchEngine|null,
+ anchorElement: HTMLElement, primary = false) {
this.dialogModel_ = searchEngine;
this.dialogAnchorElement_ = anchorElement;
+ this.isNewPrimary_ = primary;
this.showEditDialog_ = true;
}
@@ -256,6 +264,12 @@ export class SettingsSearchEnginesPageEl
this.extensions = searchEnginesInfo.extensions;
}
+ private onAddPrimarySearchEngineClick_(e: Event) {
+ e.preventDefault();
+ this.openEditDialog_(
+ null, this.shadowRoot!.querySelector('#addPrimarySearchEngine')!, true);
+ }
+
private onAddSearchEngineClick_(e: Event) {
e.preventDefault();
this.openEditDialog_(
@@ -1,6 +1,6 @@
--- a/chrome/browser/resources/settings/site_settings/notifications_page.ts
+++ b/chrome/browser/resources/settings/site_settings/notifications_page.ts
@@ -105,7 +105,7 @@ export class NotificationsPageElement ex
@@ -106,7 +106,7 @@ export class NotificationsPageElement ex
shouldShowSafetyHub_: {
type: Boolean,
value() {
@@ -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
@@ -528,7 +528,7 @@ void AddAppearanceStrings(content::WebUI
@@ -531,7 +531,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},
@@ -562,9 +562,7 @@ void AddAppearanceStrings(content::WebUI
@@ -565,9 +565,7 @@ void AddAppearanceStrings(content::WebUI
{"classicTheme", IDS_SETTINGS_CLASSIC_THEME},
{"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME},
#endif
+2 -2
View File
@@ -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
@@ -1991,7 +1991,7 @@ void AddSyncControlsStrings(content::Web
@@ -2036,7 +2036,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
@@ -1965,6 +1965,9 @@
@@ -1989,6 +1989,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>
@@ -3277,6 +3280,9 @@
@@ -3364,6 +3367,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
@@ -2138,7 +2138,7 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2183,7 +2183,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.
@@ -2881,7 +2881,7 @@ void AddSiteSettingsStrings(content::Web
@@ -2946,7 +2946,7 @@ void AddSiteSettingsStrings(content::Web
{"trackingProtectionSitesAllowedCookiesTitle",
IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_TITLE},
{"trackingProtectionSitesAllowedCookiesDescription",
@@ -50,7 +50,7 @@
window.location.href = url;
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -187,9 +187,6 @@ function createRoutes(): SettingsRoutes
@@ -192,9 +192,6 @@ function createRoutes(): SettingsRoutes
}
r.MANAGE_PROFILE = r.PEOPLE.createChild('/manageProfile');
// </if>
@@ -89,9 +89,9 @@
import '../settings_vars.css.js';
--- a/chrome/browser/resources/settings/lazy_load.ts
+++ b/chrome/browser/resources/settings/lazy_load.ts
@@ -216,9 +216,7 @@ export {SettingsImportDataDialogElement}
export {SettingsManageProfileElement} from './people_page/manage_profile.js';
export {ManageProfileBrowserProxy, ManageProfileBrowserProxyImpl, ProfileShortcutStatus} from './people_page/manage_profile_browser_proxy.js';
@@ -240,9 +240,7 @@ export {SettingsManageProfileElement} fr
export {ManageProfileBrowserProxyImpl, ProfileShortcutStatus} from './people_page/manage_profile_browser_proxy.js';
export type {ManageProfileBrowserProxy} from './people_page/manage_profile_browser_proxy.js';
// </if>
-export {SettingsSyncControlsElement} from './people_page/sync_controls.js';
export {SettingsSyncEncryptionOptionsElement} from './people_page/sync_encryption_options.js';
@@ -1,6 +1,6 @@
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -1978,6 +1978,12 @@
@@ -2002,6 +2002,12 @@
users to manage security settings">
Security
</message>
@@ -15,7 +15,7 @@
</message>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2143,9 +2143,9 @@ void AddPrivacyStrings(content::WebUIDat
@@ -2188,9 +2188,9 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL},
// TODO(crbug.com/40122957): This string is no longer used. Remove.
{"permissionsPageTitle", IDS_SETTINGS_PERMISSIONS},
@@ -69,7 +69,7 @@
sub-label="$i18n{heliumServicesDescription}"
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts
@@ -280,13 +280,11 @@ export class SettingsPrivacyPageElement
@@ -272,13 +272,11 @@ export class SettingsPrivacyPageElement
case 'heliumServices':
triggerId = 'heliumServicesLinkRow';
break;
@@ -29,7 +29,7 @@
class="cr-nav-menu-item">
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -235,7 +235,7 @@ function createRoutes(): SettingsRoutes
@@ -240,7 +240,7 @@ function createRoutes(): SettingsRoutes
r.PASSKEYS = r.YOUR_SAVED_INFO.createChild('/passkeys');
// </if>
}
@@ -1,6 +1,6 @@
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -353,7 +353,7 @@ export let routes: SettingsRoutes = Rout
@@ -358,7 +358,7 @@ export let routes: SettingsRoutes = Rout
// Returns the "effective" route when at chrome://settings/.
export function getTopLevelRoute(): Route {
if (!loadTimeData.getBoolean('isGuest')) {
@@ -1,15 +1,15 @@
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -88,7 +88,7 @@ NOTE: Chrome OS icons go in ./chromeos/o
@@ -70,7 +70,7 @@ NOTE: Chrome OS icons go in ./chromeos/o
<g id="rule-folder" viewBox="0 -960 960 960"><path d="m313-305 198-198-57-57-141 142-57-57-56 57 113 113Zm263 0 64-64 64 64 56-56-64-64 64-64-56-56-64 64-64-64-56 56 64 64-64 64 56 56ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"></path></g>
<g id="person-text" viewBox="0 -960 960 960"><path d="M648-240v-72h216v72H648Zm-48-204v-72h264v72H600Zm-72-204v-72h336v72H528ZM336-480q-50 0-85-35t-35-85q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35ZM96-240v-63q0-28 14.5-51t38.5-35q43-21 90-32t97-11q50 0 97 11t90 32q24 12 38.5 35t14.5 51v63H96Zm240-120q-53 0-95 12.5T169-312h334q-30-23-72-35.5T336-360Zm0-192q20.4 0 34.2-13.8Q384-579.6 384-600q0-20.4-13.8-34.2Q356.4-648 336-648q-20.4 0-34.2 13.8Q288-620.4 288-600q0 20.4 13.8 34.2Q315.6-552 336-552Zm0-48Zm0 288Z"></path></g>
<g id="search-spark"><path d="M15.9375 17L10.9583 12.0208C10.5417 12.3264 10.0833 12.5694 9.58333 12.75C9.08333 12.9167 8.55556 13 8 13C6.61111 13 5.43056 12.5139 4.45833 11.5417C3.48611 10.5694 3 9.38889 3 8C3 6.61111 3.48611 5.43055 4.45833 4.45833C5.43056 3.48611 6.61111 3 8 3C8.36111 3 8.70139 3.03472 9.02083 3.10417C9.35417 3.17361 9.67361 3.27778 9.97917 3.41667L8.79167 4.58333C8.66667 4.55555 8.53472 4.53472 8.39583 4.52083C8.27083 4.50694 8.13889 4.5 8 4.5C7.02778 4.5 6.20139 4.84028 5.52083 5.52083C4.84028 6.20139 4.5 7.02778 4.5 8C4.5 8.97222 4.84028 9.79861 5.52083 10.4792C6.20139 11.1597 7.02778 11.5 8 11.5C8.80556 11.5 9.51389 11.2708 10.125 10.8125C10.7361 10.3403 11.1458 9.73611 11.3542 9H12.8958C12.8264 9.36111 12.7153 9.70833 12.5625 10.0417C12.4097 10.3611 12.2292 10.6667 12.0208 10.9583L17 15.9375L15.9375 17ZM14.5 10C14.5 8.75 14.0625 7.6875 13.1875 6.8125C12.3125 5.9375 11.25 5.5 10 5.5C11.25 5.5 12.3125 5.0625 13.1875 4.1875C14.0625 3.3125 14.5 2.25 14.5 0.999999C14.5 2.25 14.9375 3.3125 15.8125 4.1875C16.6875 5.0625 17.75 5.5 19 5.5C17.75 5.5 16.6875 5.9375 15.8125 6.8125C14.9375 7.6875 14.5 8.75 14.5 10Z"></path></g>
- <g id="security"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.183 4.7L10 1.667 16.816 4.7v4.542c0 4.208-2.908 8.133-6.816 9.091-3.909-.958-6.817-4.883-6.817-9.091V4.7zM15.3 9.992H10V3.325L4.7 5.683V10l5.3-.008v6.775c2.816-.875 4.9-3.65 5.3-6.775z"></path></g>
+ <g id="security"><path d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></g>
<g id="select-window"><path d="M17.5 0.833344H6.66671C5.75004 0.833344 5.00004 1.58334 5.00004 2.50001V7.50001H2.50004C1.58337 7.50001 0.833374 8.25001 0.833374 9.16668V17.5C0.833374 18.4167 1.58337 19.1667 2.50004 19.1667H13.3334C14.25 19.1667 15 18.4167 15 17.5V12.5H17.5C18.4167 12.5 19.1667 11.75 19.1667 10.8333V2.50001C19.1667 1.58334 18.4167 0.833344 17.5 0.833344ZM13.3334 17.5H2.50004V10.8333H13.3334V17.5ZM17.5 10.8333H15V9.16668C15 8.25001 14.25 7.50001 13.3334 7.50001H6.66671V4.16668H17.5V10.8333Z"></path></g>
<g id="shield" viewBox="0 -960 960 960"><path d="M480-80q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"></path></g>
<g id="spam"><path d="M15.0714 6.66667V3.5H16.5V7.38889H15.0714V6.66667ZM15.0714 9.83333H16.5V8.38889H15.0714V9.83333ZM9.71429 10.9444C11.6214 10.9444 15.4286 11.9122 15.4286 13.8333V16H4V13.8333C4 11.9122 7.80714 10.9444 9.71429 10.9444ZM9.71429 4.44444C10.472 4.44444 11.1988 4.74881 11.7346 5.29058C12.2704 5.83235 12.5714 6.56715 12.5714 7.33333C12.5714 8.09951 12.2704 8.83431 11.7346 9.37609C11.1988 9.91786 10.472 10.2222 9.71429 10.2222C8.95652 10.2222 8.2298 9.91786 7.69398 9.37609C7.15816 8.83431 6.85714 8.09951 6.85714 7.33333C6.85714 6.56715 7.15816 5.83235 7.69398 5.29058C8.2298 4.74881 8.95652 4.44444 9.71429 4.44444ZM9.71429 12.3167C7.59286 12.3167 5.35714 13.3711 5.35714 13.8333V14.6278H14.0714V13.8333C14.0714 13.3711 11.8357 12.3167 9.71429 12.3167ZM9.71429 5.81667C9.31646 5.81667 8.93493 5.97646 8.65363 6.26089C8.37232 6.54532 8.21429 6.93109 8.21429 7.33333C8.21429 7.73558 8.37232 8.12135 8.65363 8.40578C8.93493 8.69021 9.31646 8.85 9.71429 8.85C10.1121 8.85 10.4936 8.69021 10.7749 8.40578C11.0563 8.12135 11.2143 7.73558 11.2143 7.33333C11.2143 6.93109 11.0563 6.54532 10.7749 6.26089C10.4936 5.97646 10.1121 5.81667 9.71429 5.81667Z"></path></g>
@@ -208,7 +208,7 @@ NOTE: Chrome OS icons go in ./chromeos/o
<g id="sprint"><path d="M 4.519531 16.5 L 3.480469 15.4375 L 11.417969 7.5 L 9.5 7.5 L 9.5 9 L 8 9 L 8 6 L 12.644531 6 L 16.707031 10.042969 C 17.027344 10.347656 17.378906 10.582031 17.761719 10.75 C 18.140625 10.917969 18.554688 11 19 11 L 19 12.5 C 18.359375 12.5 17.753906 12.378906 17.175781 12.136719 C 16.601562 11.890625 16.089844 11.546875 15.644531 11.105469 L 14 9.5 L 12 11.5 L 13.980469 13.480469 L 8.75 16.5 L 8 15.207031 L 11.519531 13.167969 L 9.707031 11.332031 Z M 3 11 L 3 9.5 L 7 9.5 L 7 11 Z M 1 8.5 L 1 7 L 5 7 L 5 8.5 Z M 16 7 C 15.582031 7 15.230469 6.851562 14.9375 6.558594 C 14.644531 6.261719 14.5 5.910156 14.5 5.496094 C 14.5 5.082031 14.644531 4.730469 14.9375 4.4375 C 15.230469 4.144531 15.582031 4 16 4 C 16.417969 4 16.769531 4.148438 17.0625 4.441406 C 17.355469 4.738281 17.5 5.089844 17.5 5.503906 C 17.5 5.917969 17.355469 6.269531 17.0625 6.5625 C 16.769531 6.855469 16.417969 7 16 7 Z M 3 6 L 3 4.5 L 7 4.5 L 7 6 Z M 3 6 "></path></g>
<g id="sync-saved-locally"><path d="M 9.105469 11.707031 L 13.832031 7 L 12.644531 5.8125 L 9.105469 9.355469 L 7.332031 7.582031 L 6.167969 8.75 Z M 0.832031 17.5 L 0.832031 15.832031 L 19.167969 15.832031 L 19.167969 17.5 Z M 3.332031 15 C 2.875 15 2.484375 14.835938 2.15625 14.511719 C 1.828125 14.183594 1.667969 13.792969 1.667969 13.332031 L 1.667969 4.167969 C 1.667969 3.707031 1.828125 3.316406 2.15625 2.988281 C 2.484375 2.664062 2.875 2.5 3.332031 2.5 L 16.667969 2.5 C 17.125 2.5 17.515625 2.664062 17.84375 2.988281 C 18.171875 3.316406 18.332031 3.707031 18.332031 4.167969 L 18.332031 13.332031 C 18.332031 13.792969 18.171875 14.183594 17.84375 14.511719 C 17.515625 14.835938 17.125 15 16.667969 15 Z M 3.332031 13.332031 L 16.667969 13.332031 L 16.667969 4.167969 L 3.332031 4.167969 Z M 3.332031 13.332031 L 3.332031 4.167969 Z M 3.332031 13.332031 "></path></g>
@@ -173,7 +173,7 @@ NOTE: Chrome OS icons go in ./chromeos/o
<!-- Navigation: Security GM3 icon -->
<g id="security" viewBox="0 -960 960 960">
@@ -10,7 +10,7 @@
"appearance_page/appearance_page.ts",
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -506,6 +506,8 @@ void AddAppearanceStrings(content::WebUI
@@ -509,6 +509,8 @@ void AddAppearanceStrings(content::WebUI
Profile* profile) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"appearancePageTitle", IDS_SETTINGS_APPEARANCE},
@@ -36,7 +36,7 @@
</message>
--- /dev/null
+++ b/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
@@ -0,0 +1,15 @@
@@ -0,0 +1,14 @@
+<style include="cr-shared-style settings-shared"></style>
+<settings-section page-title="$i18n{behaviorPageTitle}">
+
@@ -46,7 +46,6 @@
+ </settings-toggle-button>
+
+ <settings-toggle-button class="hr" id="splitViewDragAndDrop"
+ hidden="[[!showSplitViewDragAndDropSetting_]]"
+ pref="{{prefs.browser.split_view_drag_and_drop_enabled}}"
+ label="$i18n{allowSplitViewDragAndDrop}">
+ </settings-toggle-button>
@@ -198,15 +197,14 @@
- label="$i18n{autoPinNewTabGroups}">
- </settings-toggle-button>
-
<template is="dom-if" if="[[showTabSearchPositionSettings_]]" restamp>
<div class="cr-row" id="tabSearchPositionRow">
<div class="flex cr-padded-text" aria-hidden="true">
@@ -299,11 +272,6 @@
<div class="cr-row">
<div class="flex cr-padded-text" aria-hidden="true">
$i18n{sidePanelPosition}
@@ -280,10 +253,6 @@
</settings-toggle-button>
</if>
</div>
- <settings-toggle-button class="hr" id="splitViewDragAndDrop"
- hidden="[[!showSplitViewDragAndDropSetting_]]"
- pref="{{prefs.browser.split_view_drag_and_drop_enabled}}"
- label="$i18n{allowSplitViewDragAndDrop}">
- </settings-toggle-button>
@@ -228,7 +226,7 @@
<a role="menuitem" href="/search" class="cr-nav-menu-item">
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -121,6 +121,11 @@ NOTE: Chrome OS icons go in ./chromeos/o
@@ -96,6 +96,11 @@ NOTE: Chrome OS icons go in ./chromeos/o
<cr-iconset name="settings" size="24">
<svg>
<defs>
@@ -24,7 +24,7 @@
Signed in to <ph name="EMAIL">$1<ex>abcd@google.com</ex></ph>
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -1850,8 +1850,8 @@ void AddPersonalizationOptionsStrings(co
@@ -1895,8 +1895,8 @@ void AddPersonalizationOptionsStrings(co
{"enablePersonalizationLoggingDesc",
IDS_SETTINGS_ENABLE_LOGGING_PREF_DESC},
{"spellingDescription", IDS_SETTINGS_SPELLING_PREF_DESC},
@@ -21,7 +21,7 @@
#include "components/safe_browsing/buildflags.h"
#include "components/safe_browsing/core/common/safebrowsing_referral_methods.h"
#include "components/strings/grit/components_strings.h"
@@ -632,6 +633,7 @@ bool DownloadUIModel::IsCommandEnabled(
@@ -637,6 +638,7 @@ bool DownloadUIModel::IsCommandEnabled(
case DownloadCommands::BYPASS_DEEP_SCANNING_AND_OPEN:
case DownloadCommands::RETRY:
case DownloadCommands::CANCEL_DEEP_SCAN:
@@ -29,7 +29,7 @@
return true;
case DownloadCommands::REVIEW:
#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
@@ -674,6 +676,7 @@ bool DownloadUIModel::IsCommandChecked(
@@ -679,6 +681,7 @@ bool DownloadUIModel::IsCommandChecked(
case DownloadCommands::CANCEL_DEEP_SCAN:
case DownloadCommands::OPEN_WITH_MEDIA_APP:
case DownloadCommands::EDIT_WITH_MEDIA_APP:
@@ -37,7 +37,7 @@
return false;
}
return false;
@@ -724,6 +727,14 @@ void DownloadUIModel::ExecuteCommand(Dow
@@ -729,6 +732,14 @@ void DownloadUIModel::ExecuteCommand(Dow
ui::PAGE_TRANSITION_LINK, false),
/*navigation_handle_callback=*/{});
break;
@@ -52,7 +52,7 @@
case DownloadCommands::OPEN_SAFE_BROWSING_SETTING:
chrome::ShowSafeBrowsingEnhancedProtectionWithIph(
download_commands->GetBrowser(),
@@ -1206,6 +1217,9 @@ DownloadUIModel::BubbleStatusTextBuilder
@@ -1215,6 +1226,9 @@ DownloadUIModel::BubbleStatusTextBuilder
break;
case FailState::FILE_BLOCKED:
string_id = IDS_POLICY_ACTION_BLOCKED_BY_ORGANIZATION;
@@ -60,8 +60,8 @@
+ string_id = IDS_DOWNLOAD_BUBBLE_INTERRUPTED_EXTENSION_DL_DISABLED;
+ }
break;
case FailState::FILE_SECURITY_CHECK_FAILED:
string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS_SECURITY_CHECK_FAILED;
case FailState::LOCAL_DOWNLOAD_BLOCKED:
string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS_LOCAL_DOWNLOAD_BLOCKED;
--- a/chrome/browser/ui/download/download_bubble_security_view_info.cc
+++ b/chrome/browser/ui/download/download_bubble_security_view_info.cc
@@ -18,6 +18,7 @@
@@ -72,7 +72,7 @@
#include "components/offline_items_collection/core/fail_state.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h"
@@ -225,6 +226,15 @@ void DownloadBubbleSecurityViewInfo::Pop
@@ -227,6 +228,15 @@ void DownloadBubbleSecurityViewInfo::Pop
case FailState::FILE_BLOCKED:
warning_summary_ = l10n_util::GetStringUTF16(
IDS_DOWNLOAD_BUBBLE_INTERRUPTED_SUBPAGE_SUMMARY_BLOCKED_ORGANIZATION);
@@ -90,7 +90,7 @@
warning_summary_ = l10n_util::GetStringUTF16(
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -3061,6 +3061,10 @@ are declared in tools/grit/grit_args.gni
@@ -3078,6 +3078,10 @@ are declared in tools/grit/grit_args.gni
desc="Status text for a download item that was interrupted because the file path name is too long.">
File name or location is too long
</message>
@@ -101,7 +101,7 @@
<message name="IDS_DOWNLOAD_BUBBLE_INTERRUPTED_SUBPAGE_SUMMARY_PATH_TOO_LONG"
desc="Subpage summary text for a download item that was interrupted because the file path name is too long.">
Try using a shorter file name or saving to a different folder
@@ -3089,6 +3093,10 @@ are declared in tools/grit/grit_args.gni
@@ -3106,6 +3110,10 @@ are declared in tools/grit/grit_args.gni
desc="Status text for a download item that had something go wrong.">
Something went wrong
</message>
@@ -124,7 +124,7 @@
default:
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -708,6 +708,7 @@ bool DownloadItemModel::IsCommandEnabled
@@ -711,6 +711,7 @@ bool DownloadItemModel::IsCommandEnabled
case DownloadCommands::REVIEW:
case DownloadCommands::RETRY:
case DownloadCommands::CANCEL_DEEP_SCAN:
@@ -132,7 +132,7 @@
return DownloadUIModel::IsCommandEnabled(download_commands, command);
}
NOTREACHED();
@@ -751,6 +752,7 @@ bool DownloadItemModel::IsCommandChecked
@@ -754,6 +755,7 @@ bool DownloadItemModel::IsCommandChecked
case DownloadCommands::CANCEL_DEEP_SCAN:
case DownloadCommands::OPEN_WITH_MEDIA_APP:
case DownloadCommands::EDIT_WITH_MEDIA_APP:
@@ -140,7 +140,7 @@
return false;
}
return false;
@@ -858,6 +860,7 @@ void DownloadItemModel::ExecuteCommand(D
@@ -861,6 +863,7 @@ void DownloadItemModel::ExecuteCommand(D
case DownloadCommands::RETRY:
case DownloadCommands::OPEN_WITH_MEDIA_APP:
case DownloadCommands::EDIT_WITH_MEDIA_APP:
+2 -2
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -768,9 +768,6 @@ SaveAndShareSubMenuModel::SaveAndShareSu
@@ -769,9 +769,6 @@ SaveAndShareSubMenuModel::SaveAndShareSu
if (!sharing_hub::SharingIsDisabledByPolicy(browser->profile())) {
AddItemWithStringIdAndVectorIcon(
this, IDC_COPY_URL, IDS_APP_MENU_COPY_LINK, kLinkChromeRefreshIcon);
@@ -10,7 +10,7 @@
AddItemWithStringIdAndVectorIcon(this, IDC_QRCODE_GENERATOR,
IDS_APP_MENU_CREATE_QR_CODE,
kQrCodeChromeRefreshIcon);
@@ -914,23 +911,6 @@ void ToolsMenuModel::Build(Browser* brow
@@ -915,23 +912,6 @@ void ToolsMenuModel::Build(Browser* brow
AddItemWithStringIdAndVectorIcon(this, IDC_NAME_WINDOW, IDS_NAME_WINDOW,
kNameWindowIcon);
+4 -4
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/toolbar/app_menu.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -252,7 +252,7 @@ class InMenuButtonBackground : public vi
@@ -254,7 +254,7 @@ class InMenuButtonBackground : public vi
constexpr int kCircularButtonSize = 28;
bounds_rect.ClampToCenteredSize(
gfx::Size(kCircularButtonSize, kCircularButtonSize));
@@ -9,7 +9,7 @@
}
const auto* const color_provider = view->GetColorProvider();
cc::PaintFlags flags;
@@ -1475,21 +1475,8 @@ void AppMenu::PopulateMenu(MenuItemView*
@@ -1477,21 +1477,8 @@ void AppMenu::PopulateMenu(MenuItemView*
PopulateMenu(item, model->GetSubmenuModelAt(i));
}
@@ -31,7 +31,7 @@
ProfileAttributesEntry* profile_attributes =
GetProfileAttributesFromProfile(browser_->profile());
if (profile_attributes &&
@@ -1503,7 +1490,6 @@ void AppMenu::PopulateMenu(MenuItemView*
@@ -1505,7 +1492,6 @@ void AppMenu::PopulateMenu(MenuItemView*
break;
}
case IDC_UPGRADE_DIALOG: {
@@ -39,7 +39,7 @@
if (const auto upgrade_substring_text = GetUpgradeDialogSubstringText();
!upgrade_substring_text.empty()) {
item->AddChildView(
@@ -1523,18 +1509,6 @@ void AppMenu::PopulateMenu(MenuItemView*
@@ -1525,18 +1511,6 @@ void AppMenu::PopulateMenu(MenuItemView*
break;
}
case IDC_WEB_APP_UPGRADE_DIALOG: {
+5 -5
View File
@@ -50,7 +50,7 @@
raw_ptr<DocumentProvider> document_provider_ = nullptr;
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -94,6 +94,7 @@
@@ -93,6 +93,7 @@
#include "components/optimization_guide/machine_learning_tflite_buildflags.h"
#include "components/search_engines/search_engine_type.h"
#include "components/search_engines/template_url.h"
@@ -102,7 +102,7 @@
std::unique_ptr<KeywordExtensionsDelegate> extensions_delegate_;
--- a/components/omnibox/browser/keyword_provider.cc
+++ b/components/omnibox/browser/keyword_provider.cc
@@ -25,6 +25,7 @@
@@ -24,6 +24,7 @@
#include "components/omnibox/browser/search_provider.h"
#include "components/omnibox/common/omnibox_feature_configs.h"
#include "components/search_engines/template_url.h"
@@ -110,7 +110,7 @@
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/template_url_starter_pack_data.h"
#include "components/strings/grit/components_strings.h"
@@ -427,8 +428,18 @@ void KeywordProvider::FillInUrlAndConten
@@ -426,8 +427,18 @@ void KeywordProvider::FillInUrlAndConten
GetTemplateURLService()->search_terms_data()) &&
(turl->type() != TemplateURL::OMNIBOX_API_EXTENSION)) {
// Substituting site search.
@@ -159,7 +159,7 @@
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/accessibility/ax_enums.mojom.h"
@@ -115,6 +116,14 @@ void SelectedKeywordView::SetCustomImage
@@ -116,6 +117,14 @@ void SelectedKeywordView::SetCustomImage
} else if (template_url && template_url->starter_pack_id() ==
template_url_starter_pack_data::kAiMode) {
vector_icon = &omnibox::kSearchSparkIcon;
@@ -185,7 +185,7 @@
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "third_party/metrics_proto/omnibox_event.pb.h"
@@ -516,6 +518,26 @@ void OmniboxSuggestionButtonRowView::Upd
@@ -517,6 +519,26 @@ void OmniboxSuggestionButtonRowView::Upd
const auto names = SelectedKeywordView::GetKeywordLabelNames(
match().associated_keyword,
popup_view_->controller()->client()->GetTemplateURLService());
@@ -2,7 +2,7 @@
+++ b/chrome/browser/ui/views/bookmarks/bookmark_button.cc
@@ -60,7 +60,8 @@ BookmarkButtonBase::BookmarkButtonBase(P
SetImageLabelSpacing(
GetLayoutConstant(BOOKMARK_BAR_BUTTON_IMAGE_LABEL_PADDING));
GetLayoutConstant(LayoutConstant::kBookmarkBarButtonImageLabelPadding));
- views::InstallPillHighlightPathGenerator(this);
+ views::InstallRoundRectHighlightPathGenerator(this, gfx::Insets(),
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -173,7 +173,7 @@ using PermanentFolderType = BookmarkPare
@@ -174,7 +174,7 @@ using PermanentFolderType = BookmarkPare
bool animations_enabled = true;
// Thickness of the separator (|) in dips (density-independent pixels).
@@ -9,7 +9,7 @@
gfx::ImageSkia* GetImageSkiaNamed(int id) {
return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
@@ -352,8 +352,8 @@ class BookmarkBarView::ButtonSeparatorVi
@@ -367,8 +367,8 @@ class BookmarkBarView::ButtonSeparatorVi
public:
ButtonSeparatorView() {
@@ -20,7 +20,7 @@
separator_thickness_ = kBookmarkBarSeparatorThickness;
const gfx::Insets border_insets =
gfx::Insets::TLBR(0, leading_padding, 0, trailing_padding);
@@ -703,7 +703,7 @@ void BookmarkBarView::Layout(PassKey) {
@@ -718,7 +718,7 @@ void BookmarkBarView::Layout(PassKey) {
}
int x = GetLeadingMargin();
@@ -28,8 +28,8 @@
+ static constexpr int kBookmarkBarTrailingMargin = 6;
int width = View::width() - x - kBookmarkBarTrailingMargin;
const int button_height = GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT);
@@ -824,7 +824,7 @@ void BookmarkBarView::Layout(PassKey) {
const int button_height =
@@ -840,7 +840,7 @@ void BookmarkBarView::Layout(PassKey) {
// the bookmark buttons.
if (saved_tab_group_bar_width > 0) {
// Possibly update the paddings of the separator
+19 -24
View File
@@ -1,6 +1,6 @@
--- a/chrome/browser/resources/new_tab_page/app.css
+++ b/chrome/browser/resources/new_tab_page/app.css
@@ -140,6 +140,7 @@ cr-most-visited {
@@ -142,6 +142,7 @@ cr-most-visited {
align-items: center;
display: flex;
flex-direction: column;
@@ -10,11 +10,12 @@
padding-top: var(--ntp-one-google-bar-height);
--- a/chrome/browser/resources/new_tab_page/app.html
+++ b/chrome/browser/resources/new_tab_page/app.html
@@ -1,113 +1,4 @@
@@ -1,107 +1,4 @@
-<!-- #html_wrapper_imports_start
-import {nothing} from '//resources/lit/v3_0/lit.rollup.js';
-#html_wrapper_imports_end -->
<div id="content">
-<div id="content"
- ?ntp-threads-rail-open="${this.showComposebox_ && this.enableThreadsRail_}">
- ${this.lazyRender_ && this.microsoftModuleEnabled_ ? html`
- <iframe id="microsoftAuth" src="${this.microsoftAuthIframePath_}"></iframe>
- ` : ''}
@@ -49,7 +50,7 @@
- </ntp-logo>
- ${this.ntpRealboxNextEnabled_ ? html`
- <div id="scrim"
- @click="${this.showComposebox_ && this.composeboxCloseByClickOutside_ ? this.onComposeboxClickOutside_ : nothing}"
- @click="${this.onScrimClick_}"
- ?hidden="${!this.showScrim_}"></div>
- ` : ''}
- <div id="searchboxContainer">
@@ -73,31 +74,24 @@
- ?multi-line-enabled="${this.multiLineEnabled_}">
- </cr-searchbox>
- ${this.showComposebox_ ? html`
- ${this.enableModalComposebox_ ? html`
- <div id="dialogAnchor"></div>
- <dialog id="composeboxDialog">
- <cr-composebox id="composebox"
- ?ntp-realbox-next-enabled="${this.ntpRealboxNextEnabled_}"
- ?searchbox-next-enabled="${this.ntpRealboxNextEnabled_}"
- @composebox-initialized="${this.onComposeboxInitialized_}"
- @close-composebox="${this.closeComposebox_}"
- @composebox-input-focus-changed="${this.onInputFocusChanged_}"
- @context-menu-entrypoint-click="${this.onContextMenuEntrypointClick_}"
- @voice-search-action="${this.onComposeVoiceSearchAction_}"
- searchbox-layout-mode="${this.realboxLayoutMode_}">
- </cr-composebox>
- </dialog>
- ` : html`
- <div id="dialogAnchor"></div>
- <dialog id="composeboxDialog">
- <cr-composebox id="composebox"
- ?ntp-realbox-next-enabled="${this.ntpRealboxNextEnabled_}"
- ?searchbox-next-enabled="${this.ntpRealboxNextEnabled_}"
- ?disable-caret-color-animation="${true}"
- @composebox-initialized="${this.onComposeboxInitialized_}"
- @close-composebox="${this.closeComposebox_}"
- @composebox-input-focus-changed="${this.onInputFocusChanged_}"
- @voice-search-query="${this.onComposeVoiceSearchAction_}"
- @context-menu-entrypoint-click="${this.onContextMenuEntrypointClick_}"
- @voice-search-action="${this.onComposeVoiceSearchAction_}"
- searchbox-layout-mode="${this.realboxLayoutMode_}">
- </cr-composebox>
- `}
- ${this.enableThreadsRail_ ? html`
- <cr-threads-rail id="threadsRail">
- </cr-threads-rail>
- ` : ''}
- </dialog>
- ` : ''}
- ${this.showLensUploadDialog_ ? html`
- <ntp-lens-upload-dialog id="lensUploadDialog"
@@ -108,7 +102,7 @@
- ${this.lazyRender_
- && this.ntpNextFeaturesEnabled_ && this.isActionChipsVisible_ ? html`
- <ntp-action-chips
- ?theme-has-background-image="${this.themeHasBackgroundImage_()}"
- ?show-background="${this.showActionChipsBackground_()}"
- @action-chip-click="${this.openComposebox_}"
- @action-chips-retrieval-state-changed="${this.onActionChipsRetrievalStateChanged_}">
- </ntp-action-chips>
@@ -121,10 +115,11 @@
- </cr-button>
- </cr-toast>
- ` : ''}
+<div id="content">
${this.lazyRender_ ? html`
${this.shortcutsEnabled_ ? html`
<cr-most-visited id="mostVisited" .theme="${this.theme_?.mostVisited || null}"
@@ -117,65 +8,7 @@ import {nothing} from '//resources/lit/v
@@ -111,65 +8,7 @@ import {nothing} from '//resources/lit/v
@most-visited-auto-removed="${this.showAutoRemovedToast_}">
</cr-most-visited>
` : ''}
@@ -190,7 +185,7 @@
<ntp-customize-buttons id="customizeButtons"
?modules-shown-to-user="${this.modulesShownToUser}"
?show-background-image="${this.showBackgroundImage_}"
@@ -197,23 +30,3 @@ import {nothing} from '//resources/lit/v
@@ -191,23 +30,3 @@ import {nothing} from '//resources/lit/v
` : ''}
<div id="contentBottomSpacer"></div>
</div>
@@ -1,27 +1,26 @@
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
@@ -124,24 +124,6 @@ void ShowExtensionPostInstallDialog(
.SetIcon(ui::ImageModel::FromImageSkia(
weak_delegate->model()->MakeIconOfSize(kMaxIconSize)));
- if (weak_delegate->model()->show_how_to_use()) {
--- a/chrome/browser/ui/extensions/extension_post_install_dialog.cc
+++ b/chrome/browser/ui/extensions/extension_post_install_dialog.cc
@@ -49,23 +49,6 @@ void ConfigurePostInstallDialogModel(
extension_name))
.SetIcon(
ui::ImageModel::FromImageSkia(model->MakeIconOfSize(kMaxIconSize)));
-
- if (model->show_how_to_use()) {
- dialog_model_builder.AddParagraph(
- ui::DialogModelLabel(weak_delegate->model()->GetHowToUseText()));
- ui::DialogModelLabel(model->GetHowToUseText()));
- }
- if (weak_delegate->model()->show_key_binding()) {
- if (model->show_key_binding() && manage_shortcuts_callback) {
- dialog_model_builder.AddParagraph(
- ui::DialogModelLabel::CreateWithReplacement(
- IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS,
- ui::DialogModelLabel::CreateLink(
- IDS_EXTENSION_INSTALLED_MANAGE_SHORTCUTS_LINK_TEXT,
- base::BindRepeating(&ExtensionInstalledBubbleView::LinkClicked,
- base::Unretained(weak_delegate)))));
- manage_shortcuts_callback)));
- }
-
- if (weak_delegate->model()->show_how_to_manage()) {
- if (model->show_how_to_manage()) {
- dialog_model_builder.AddParagraph(ui::DialogModelLabel(
- l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALLED_MANAGE_INFO)));
- }
#if !BUILDFLAG(IS_CHROMEOS)
// Add a sync or sign in promo in the footer if it should be shown.
extensions::ExtensionRegistry* registry =
}
void OpenExtensionsShortcutsPage(
@@ -0,0 +1,44 @@
--- a/ui/views/style/platform_style.h
+++ b/ui/views/style/platform_style.h
@@ -70,7 +70,7 @@ class VIEWS_EXPORT PlatformStyle {
static constexpr bool kTreeViewSelectionPaintsEntireRow = BUILDFLAG(IS_MAC);
// Whether ripples should be used for visual feedback on control activation.
- static constexpr bool kUseRipples = !BUILDFLAG(IS_MAC);
+ static constexpr bool kUseRipples = false;
// Whether text fields should use a "drag" cursor when not actually
// dragging but available to do so.
--- a/ui/webui/resources/cr_elements/cr_ripple/cr_ripple_mixin.ts
+++ b/ui/webui/resources/cr_elements/cr_ripple/cr_ripple_mixin.ts
@@ -31,7 +31,7 @@ export const CrRippleMixin =
};
}
- accessor noink: boolean = false;
+ accessor noink: boolean = true;
rippleContainer: HTMLElement|null = null;
private ripple_: CrRippleElement|null = null;
--- a/ui/webui/resources/cr_elements/cr_ripple/cr_ripple_mixin_polymer.ts
+++ b/ui/webui/resources/cr_elements/cr_ripple/cr_ripple_mixin_polymer.ts
@@ -31,7 +31,7 @@ export const CrRippleMixinPolymer =
noink: {
type: Boolean,
observer: 'onNoinkChanged_',
- value: false,
+ value: true,
},
};
}
--- a/ui/webui/resources/cr_elements/cr_ripple/cr_ripple.ts
+++ b/ui/webui/resources/cr_elements/cr_ripple/cr_ripple.ts
@@ -38,7 +38,7 @@ export class CrRippleElement extends CrL
accessor holdDown: boolean = false;
accessor recenters: boolean = false;
- accessor noink: boolean = false;
+ accessor noink: boolean = true;
private ripples_: Element[] = [];
private eventTracker_: EventTracker = new EventTracker();
@@ -1,404 +0,0 @@
--- a/chrome/browser/helium_flag_choices.h
+++ b/chrome/browser/helium_flag_choices.h
@@ -33,6 +33,9 @@ namespace helium {
constexpr const char kHeliumNoiseAudioCommandLine[] = "helium-noise-audio";
constexpr const char kMiddleClickAutoscrollCommandLine[] = "middle-click-autoscroll";
+ constexpr const char kHeliumCatUiCommandLine[] = "helium-cat-ui";
+ constexpr const char kHeliumCatFixedAddressBarCommandLine[] =
+ "helium-cat-fixed-address-bar";
} // namespace helium
--- a/chrome/browser/helium_flag_entries.h
+++ b/chrome/browser/helium_flag_entries.h
@@ -32,4 +32,12 @@
"Middle Click Autoscroll",
"Enables autoscroll on middle click. Helium flag, Chromium feature.",
kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kHeliumMiddleClickAutoscroll)},
+ {helium::kHeliumCatUiCommandLine,
+ "[CAT] Helium Compact Action Toolbar UI",
+ "Enables the new experimental UI that merges the tab strip and toolbar into one UI component to save vertical screen estate. Early and buggy, stuff will break and/or look weird. Helium flag.",
+ kOsDesktop, FEATURE_VALUE_TYPE(features::kHeliumCatUi)},
+ {helium::kHeliumCatFixedAddressBarCommandLine,
+ "[CAT] Fixed address bar width",
+ "Prevents the address bar from shrinking in the CAT layout. Will push toolbar actions outside of bounds on small window sizes, beware. Works only when the main CAT flag is enabled. Early and buggy, stuff will break and/or look weird. Helium flag.",
+ kOsDesktop, FEATURE_VALUE_TYPE(features::kHeliumCatFixedAddressBar)},
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -17,6 +17,22 @@
namespace features {
+// Helium Compact Action Toolbar UI
+BASE_FEATURE(kHeliumCatUi,
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
+BASE_FEATURE(kHeliumCatFixedAddressBar,
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
+bool IsHeliumCatEnabled() {
+ return base::FeatureList::IsEnabled(kHeliumCatUi);
+}
+
+bool IsHeliumCatFixedAddressBar() {
+ return IsHeliumCatEnabled() && base::FeatureList::IsEnabled(
+ kHeliumCatFixedAddressBar);
+}
+
// Enables the use of WGC for the Eye Dropper screen capture.
BASE_FEATURE(kAllowEyeDropperWGCScreenCapture,
#if BUILDFLAG(IS_WIN)
--- a/chrome/browser/ui/ui_features.h
+++ b/chrome/browser/ui/ui_features.h
@@ -20,6 +20,11 @@ namespace features {
// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.
+BASE_DECLARE_FEATURE(kHeliumCatUi);
+BASE_DECLARE_FEATURE(kHeliumCatFixedAddressBar);
+bool IsHeliumCatEnabled();
+bool IsHeliumCatFixedAddressBar();
+
BASE_DECLARE_FEATURE(kAllowEyeDropperWGCScreenCapture);
BASE_DECLARE_FEATURE(kCreateNewTabGroupAppMenuTopLevel);
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1058,9 +1058,13 @@ BrowserView::BrowserView(Browser* browse
// Tabstrip comes basically last because it should be before toolbar in the
// focus order but also needs to paint on top of everything.
- tab_strip_region_view_ =
- AddChildView(std::make_unique<TabStripRegionView>(this));
- tab_strip_region_insertion_index_ = GetIndexOf(tab_strip_region_view_.get());
+ // When the CAT feature is enabled, tab strip is in the toolbar.
+ // We shouldn't create a duplicate tab strip.
+ if (!features::IsHeliumCatEnabled() || !GetIsNormalType()) {
+ tab_strip_region_view_ =
+ AddChildView(std::make_unique<TabStripRegionView>(this));
+ tab_strip_region_insertion_index_ = GetIndexOf(tab_strip_region_view_.get());
+ }
if (tabs::IsVerticalTabsFeatureEnabled()) {
auto vertical_tab_strip_container =
@@ -1387,7 +1391,8 @@ bool BrowserView::ShouldDrawTabStrip() c
// since callers may otherwise try to access it. Note that we can't just check
// this alone, as the tabstrip is created unconditionally even for windows
// that won't display it.
- return tab_strip_region_view_->tab_strip() != nullptr;
+ return tab_strip_region_view_ != nullptr &&
+ tab_strip_region_view_->tab_strip() != nullptr;
}
bool BrowserView::GetIncognito() const {
@@ -4238,9 +4243,10 @@ void BrowserView::ReparentTabStripAndWeb
// The TabStrip must be placed in the same position before the reparenting
// to maintain the correct Z-order to ensure it can receive mouse events.
// See crbug.com/454852658.
- DCHECK(tab_strip_region_insertion_index_);
- AddChildViewAt(tab_strip_region_view_.get(),
- tab_strip_region_insertion_index_.value());
+ if (tab_strip_region_insertion_index_) {
+ AddChildViewAt(tab_strip_region_view_.get(),
+ tab_strip_region_insertion_index_.value());
+ }
// Reparent PWA views that were moved for immersive and ChromeOS tablet
// mode.
@@ -5299,6 +5305,12 @@ void BrowserView::AddedToWidget() {
toolbar_->Init();
+ // When the CAT feature is enabled, the tab strip is owned by the toolbar.
+ if (features::IsHeliumCatEnabled() && GetIsNormalType()) {
+ tab_strip_region_view_ =
+ static_cast<TabStripRegionView*>(toolbar_->GetTabStripRegionView());
+ }
+
UpdateTabSearchBubbleHost();
// TODO(pbos): Investigate whether the side panels should be creatable when
--- a/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc
+++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc
@@ -396,6 +396,15 @@ void BrowserViewLayoutImplOld::LayoutVer
void BrowserViewLayoutImplOld::LayoutTabStripRegion(
gfx::Rect& available_bounds) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutTabStripRegion");
+
+ // If the CAT feature is enabled and we're in a normal browser,
+ // skip laying out the tab strip region. It's laid out in the toolbar.
+ // The tab strip isn't drawn in other browser types, so the next
+ // if statement will hide it.
+ if (features::IsHeliumCatEnabled() && browser()->is_type_normal()) {
+ return;
+ }
+
if (!delegate().ShouldDrawTabStrip()) {
SetViewVisibility(views().tab_strip_region_view, false);
views().tab_strip_region_view->SetBounds(0, 0, 0, 0);
@@ -449,6 +458,15 @@ void BrowserViewLayoutImplOld::LayoutToo
toolbar_bounds.set_width(toolbar_bounds.width() -
kMinVerticalTabStripWidth);
views().toolbar->SetBoundsRect(toolbar_bounds);
+ } else if (features::IsHeliumCatEnabled() && delegate().ShouldDrawTabStrip()) {
+ // If CAT is enabled and the tab strip should be drawn, then we're most
+ // likely layered under window controls, so we accommodate space for
+ // them like a tab strip would.
+ gfx::Rect tab_strip_region_bounds(
+ delegate().GetBoundsForTabStripRegionInBrowserView());
+ int height = toolbar_visible ? views().toolbar->GetPreferredSize().height() : 0;
+ views().toolbar->SetBounds(tab_strip_region_bounds.x(), available_bounds.y(),
+ tab_strip_region_bounds.width(), height);
} else {
int height =
toolbar_visible ? views().toolbar->GetPreferredSize().height() : 0;
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -58,6 +58,7 @@
#include "chrome/browser/ui/views/extensions/extensions_toolbar_coordinator.h"
#include "chrome/browser/ui/views/frame/browser_frame_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
#include "chrome/browser/ui/views/frame/top_container_background.h"
#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_contextual_menu.h"
#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h"
@@ -152,6 +153,8 @@ DEFINE_UI_CLASS_PROPERTY_KEY(bool, kActi
namespace {
+constexpr int kPreferredCompactWidth = 350;
+
// Gets the display mode for a given browser.
ToolbarView::DisplayMode GetDisplayMode(Browser* browser) {
#if BUILDFLAG(IS_CHROMEOS)
@@ -535,6 +538,26 @@ void ToolbarView::Init() {
reload_->SetVisible(show_reload_button_.GetValue());
+ // Tab strip should be in the toolbar only when the CAT feature is enabled.
+ if (features::IsHeliumCatEnabled()) {
+ auto tab_strip_region_view =
+ std::make_unique<TabStripRegionView>(browser_view_);
+ tab_strip_region_view_ = tab_strip_region_view.get();
+
+ // Add the tab strip region view to the container view right after
+ // the location bar if it's present.
+ auto location_bar_index = location_bar_ ?
+ container_view_->GetIndexOf(location_bar_) :
+ std::nullopt;
+
+ if (location_bar_index) {
+ container_view_->AddChildViewAt(std::move(tab_strip_region_view),
+ *location_bar_index + 1);
+ } else {
+ container_view_->AddChildView(std::move(tab_strip_region_view));
+ }
+ }
+
show_avatar_button_.Init(
prefs::kShowAvatarButton, prefs,
base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
@@ -565,12 +588,30 @@ void ToolbarView::Init() {
InitLayout();
+ auto flex_preferred = views::FlexSpecification(
+ views::MinimumFlexSizeRule::kPreferred,
+ views::MaximumFlexSizeRule::kPreferred);
+
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
home_, avatar_}) {
if (button) {
button->set_tag(GetViewCommandMap().at(button->GetID()));
+ button->SetProperty(views::kFlexBehaviorKey, flex_preferred);
}
}
+
+ // Pinned actions (including downloads) and extensions
+ // should not shrink in CAT layout.
+ if (features::IsHeliumCatEnabled()) {
+ pinned_toolbar_actions_container_->SetProperty(
+ views::kFlexBehaviorKey, flex_preferred);
+
+ if (extensions_container_) {
+ extensions_container_->SetProperty(
+ views::kFlexBehaviorKey, flex_preferred);
+ }
+ }
+
if (browser_view_->GetSupportsTabStrip()) {
browser()->GetTabStripModel()->AddObserver(this);
}
@@ -695,6 +736,24 @@ bool ToolbarView::IsRectInWindowCaption(
return gfx::ToEnclosingRect(rect_in_target_coords_f);
};
+ // Check the tab strip region first if CAT is enabled.
+ if (features::IsHeliumCatEnabled() && tab_strip_region_view_) {
+ const gfx::Rect tab_strip_rect = get_target_rect(tab_strip_region_view_);
+ if (tab_strip_region_view_->GetLocalBounds().Intersects(tab_strip_rect)) {
+ // Check if the rect is actually on the tab strip region view.
+ if (tab_strip_region_view_->HitTestRect(tab_strip_rect)) {
+ auto* tab_strip_region =
+ static_cast<TabStripRegionView*>(tab_strip_region_view_);
+
+ if (tab_strip_region->IsPositionInWindowCaption(tab_strip_rect.origin())) {
+ return true;
+ }
+
+ return false;
+ }
+ }
+ }
+
// Check each child view in container_view_ to see if the rect intersects with
// any clickable elements. If it does, check if the click is actually on that
// element. False if on a clickable element, true if not on a clickable element.
@@ -974,8 +1033,12 @@ void ToolbarView::InitLayout() {
constexpr int kToolbarActionsFlexOrder = kOrderOffset + 2;
constexpr int kExtensionsFlexOrder = kOrderOffset + 3;
+ auto min_location_bar_flex = features::IsHeliumCatFixedAddressBar() ?
+ views::MinimumFlexSizeRule::kPreferred :
+ views::MinimumFlexSizeRule::kScaleToMinimum;
+
const views::FlexSpecification location_bar_flex_rule =
- views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToMinimum,
+ views::FlexSpecification(min_location_bar_flex,
views::MaximumFlexSizeRule::kUnbounded)
.WithOrder(kLocationBarFlexOrder);
@@ -991,6 +1054,12 @@ void ToolbarView::InitLayout() {
location_bar_->SetProperty(views::kMarginsKey,
gfx::Insets::VH(0, location_bar_margin));
+ if (features::IsHeliumCatEnabled()) {
+ location_bar_->SetPreferredSize(gfx::Size(kPreferredCompactWidth, 0));
+ location_bar_->SetProperty(views::kMarginsKey,
+ gfx::Insets::TLBR(0, location_bar_margin, 0, 0));
+ }
+
if (extensions_container_) {
const views::FlexSpecification extensions_flex_rule =
views::FlexSpecification(
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -147,6 +147,9 @@ class ToolbarView : public views::Access
// Shows a bookmark bubble and anchors it appropriately.
void ShowBookmarkBubble(const GURL& url, bool already_bookmarked);
+ // Returns the tab strip region view if CAT feature is enabled, nullptr otherwise.
+ views::View* GetTabStripRegionView() const { return tab_strip_region_view_.get(); }
+
// Accessors.
Browser* browser() const { return browser_; }
views::Button* GetChromeLabsButton() const;
@@ -326,6 +329,7 @@ class ToolbarView : public views::Access
raw_ptr<BrowserAppMenuButton> app_menu_button_ = nullptr;
raw_ptr<views::View> new_tab_button_ = nullptr;
raw_ptr<PinnedActionToolbarButton> tab_search_button_ = nullptr;
+ raw_ptr<views::View> tab_strip_region_view_ = nullptr;
const raw_ptr<Browser> browser_;
const raw_ptr<BrowserView> browser_view_;
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -194,6 +194,11 @@ gfx::Insets GetLayoutInsets(LayoutInset
case TOOLBAR_INTERIOR_MARGIN: {
const int vert = GetLayoutConstant(TOP_BAR_VERTICAL_PADDING);
const int horiz = vert * 2;
+
+ if (features::IsHeliumCatEnabled()) {
+ return gfx::Insets::VH(vert, horiz);
+ }
+
return touch_ui ? gfx::Insets() :
gfx::Insets::TLBR(0, horiz, vert, horiz);
}
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -659,7 +659,7 @@ int OmniboxViewViews::GetUnelidedTextWid
}
gfx::Size OmniboxViewViews::GetMinimumSize() const {
- constexpr int kMinCharacters = 20;
+ constexpr int kMinCharacters = 32;
return gfx::Size(
GetFontList().GetExpectedTextWidth(kMinCharacters) + GetInsets().width(),
GetPreferredSize().height());
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
#include "chrome/browser/ui/page_info/page_info_dialog.h"
+#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_util.h"
@@ -193,7 +194,7 @@ bool LocationIconView::GetShowText() con
url.SchemeIs(extensions::kExtensionScheme) ||
url.SchemeIs(url::kFileScheme) ||
url.SchemeIs(dom_distiller::kDomDistillerScheme)) {
- return true;
+ return !features::IsHeliumCatEnabled();
}
return !location_bar_model->GetSecureDisplayText().empty();
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -84,6 +84,14 @@ class FrameGrabHandle : public views::Vi
// is full.
// TODO(tbergquist): Define this relative to the NTB insets again.
if (base::CommandLine::ForCurrentProcess()->HasSwitch("remove-grab-handle")) return gfx::Size(0, 0);
+
+ // In CAT layout the horizontal space is very tight and toolbar padding
+ // partially makes up for the drag handle area, so we don't reserve extra
+ // space for an additional grab handle here.
+ if (features::IsHeliumCatEnabled()) {
+ return gfx::Size(0, 0);
+ }
+
return gfx::Size(27, 0);
}
};
--- a/chrome/browser/ui/views/toolbar/toolbar_controller.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_controller.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.h"
#include "chrome/browser/ui/toolbar_controller_util.h"
+#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/contextual_tasks/contextual_tasks_button.h"
#include "chrome/browser/ui/views/side_panel/side_panel_action_callback.h"
#include "chrome/browser/ui/views/side_panel/side_panel_enums.h"
@@ -297,15 +298,18 @@ ToolbarController::GetDefaultResponsiveE
nullptr,
#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
kToolbarNewTabButtonElementId),
- /*is_section_end=*/true),
- ToolbarController::ResponsiveElementInfo(
- ToolbarController::ElementIdInfo(
- kToolbarAvatarButtonElementId,
- IDS_OVERFLOW_MENU_ITEM_TEXT_PROFILE,
- is_incognito ? (&kIncognitoRefreshMenuIcon)
- : (&kUserAccountAvatarRefreshIcon),
- kToolbarAvatarButtonElementId, kToolbarAvatarBubbleElementId),
- /*is_section_end=*/false)});
+ /*is_section_end=*/true)});
+
+ if (!features::IsHeliumCatEnabled()) {
+ elements.push_back(ToolbarController::ResponsiveElementInfo(
+ ToolbarController::ElementIdInfo(
+ kToolbarAvatarButtonElementId, IDS_OVERFLOW_MENU_ITEM_TEXT_PROFILE,
+ is_incognito ? (&kIncognitoRefreshMenuIcon)
+ : (&kUserAccountAvatarRefreshIcon),
+ kToolbarAvatarButtonElementId, kToolbarAvatarBubbleElementId),
+ /*is_section_end=*/false));
+ }
+
return elements;
}
+5 -5
View File
@@ -11,7 +11,7 @@
return gfx::Rect();
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -491,7 +491,6 @@ void LocationBarView::Init() {
@@ -506,7 +506,6 @@ void LocationBarView::Init() {
params.types_enabled.push_back(PageActionIconType::kIntentPicker);
}
params.types_enabled.push_back(PageActionIconType::kPwaInstall);
@@ -81,7 +81,7 @@
// When we get Find results back, we specify a selection rect, which we
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -65,6 +65,10 @@ void SetCommonButtonAttributes(views::Im
@@ -66,6 +66,10 @@ void SetCommonButtonAttributes(views::Im
views::ConfigureVectorImageButton(button);
views::InstallCircleHighlightPathGenerator(button);
}
@@ -92,7 +92,7 @@
} // namespace
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(FindBarView, kElementId);
@@ -164,18 +168,14 @@ FindBarView::FindBarView(FindBarHost* ho
@@ -165,18 +169,14 @@ FindBarView::FindBarView(FindBarHost* ho
ChromeLayoutProvider* layout_provider = ChromeLayoutProvider::Get();
const auto horizontal_margin =
@@ -114,7 +114,7 @@
const auto image_button_margins =
toast_control_vertical_margin + vector_button_horizontal_margin;
@@ -197,8 +197,7 @@ FindBarView::FindBarView(FindBarHost* ho
@@ -198,8 +198,7 @@ FindBarView::FindBarView(FindBarHost* ho
views::Builder<views::BoxLayoutView>()
.SetOrientation(views::BoxLayout::Orientation::kHorizontal)
.SetInsideBorderInsets(
@@ -124,7 +124,7 @@
.AddChildren(
views::Builder<views::Textfield>()
.CopyAddressTo(&find_text_)
@@ -292,8 +291,7 @@ FindBarView::FindBarView(FindBarHost* ho
@@ -293,8 +292,7 @@ FindBarView::FindBarView(FindBarHost* ho
auto border = std::make_unique<views::BubbleBorder>(
views::BubbleBorder::NONE, views::BubbleBorder::STANDARD_SHADOW);
border->SetColor(kColorFindBarBackground);
@@ -1,14 +1,3 @@
--- a/chrome/browser/ui/views/frame/layout/browser_view_layout_delegate_impl.cc
+++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_delegate_impl.cc
@@ -236,7 +236,7 @@ BrowserViewLayoutDelegateImpl::GetBounds
layout.trailing_exclusion.vertical_padding);
bounds_f.set_height(
std::max(max_bound, static_cast<float>(tabstrip_minimum_size.height())));
- const int tab_margin = TabStyle::Get()->GetBottomCornerRadius();
+ const int tab_margin = TabStyle::Get()->GetBottomCornerRadius() / 2;
bounds_f.Inset(gfx::InsetsF::TLBR(
0.0f,
layout.leading_exclusion.content.width() +
--- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
+++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
@@ -63,13 +63,10 @@ const double kThinControllerHeight = 0.5
@@ -40,17 +29,23 @@
// Don't mess with the window radius before macOS 26, as concentricity was not
--- a/chrome/browser/ui/views/frame/browser_frame_view_mac.mm
+++ b/chrome/browser/ui/views/frame/browser_frame_view_mac.mm
@@ -465,10 +465,10 @@ BrowserFrameViewMac::GetCaptionButtonBou
// not precise.
@@ -476,14 +476,13 @@ BrowserFrameViewMac::GetCaptionButtonBou
return result;
}
- // These are empirically determined; feel free to change them if they're
- // not precise.
+ // Bounds determined via manual measurements
if (@available(macOS 26, *)) {
result.bounds = gfx::RectF(12, 10, 62, 18);
- result.bounds = gfx::RectF(12, 10, 62, 18);
- result.margins = gfx::OutsetsF::VH(10, 12);
+ result.margins = gfx::OutsetsF::VH(0, 6);
+ result.bounds = gfx::RectF(10, 10, 60, 14);
+ result.margins = gfx::OutsetsF::VH(6, 14);
} else {
- result.bounds = gfx::RectF(20, 11, 54, 16);
- result.margins = gfx::OutsetsF::VH(11, 20);
+ result.bounds = gfx::RectF(20, 11, 40, 16);
+ result.margins = gfx::OutsetsF::VH(0, 14);
+ result.bounds = gfx::RectF(11, 11, 52, 12);
+ result.margins = gfx::OutsetsF::VH(6, 15);
}
// Mirror for when caption buttons are on the "wrong" side.
@@ -24,7 +24,7 @@
this.pageHandler_.updateAttachedTabState();
this.setThemeEditableId_ = CustomizeChromeApiProxy.getInstance()
@@ -347,10 +330,6 @@ export class AppElement extends AppEleme
@@ -351,10 +334,6 @@ export class AppElement extends AppEleme
await this.updateComplete;
page.focusOnBackButton();
}
+5 -5
View File
@@ -298,7 +298,7 @@
--cr-fallback-color-neutral-container: rgb(242, 242, 242);
--cr-fallback-color-neutral-outline: rgb(199, 199, 199);
@@ -260,18 +261,18 @@ html {
@@ -261,18 +262,18 @@ html {
--cr-fallback-color-on-surface-subtle: rgb(71, 71, 71);
@@ -322,7 +322,7 @@
--cr-fallback-color-state-hover-on-prominent_: rgba(253, 252, 251, .1);
@@ -284,7 +285,7 @@ html {
@@ -285,7 +286,7 @@ html {
--cr-fallback-color-state-ripple-primary_: rgba(
var(--cr-fallback-color-state-ripple-primary-rgb_), 0.32);
@@ -331,7 +331,7 @@
--cr-fallback-color-disabled-background: rgba(
var(--cr-fallback-color-on-surface-rgb), .12);
@@ -339,12 +340,12 @@ html {
@@ -340,12 +341,12 @@ html {
html {
/* Colors */
--cr-fallback-color-outline: rgb(142, 145, 143);
@@ -350,9 +350,9 @@
--cr-fallback-color-neutral-container: rgb(40, 40, 40);
--cr-fallback-color-neutral-outline: rgb(117, 117, 117);
--cr-fallback-color-surface: rgb(31, 31, 31);
@@ -352,24 +353,24 @@ html {
--cr-fallback-color-surface2: rgb(45, 47, 49);
@@ -354,24 +355,24 @@ html {
--cr-fallback-color-surface3: rgb(51, 52, 56);
--cr-fallback-color-surface5: rgb(56, 58, 62);
--cr-fallback-color-on-surface-rgb: 227, 227, 227;
- --cr-fallback-color-surface-variant: rgb(68, 71, 70);
- --cr-fallback-color-on-surface-variant: rgb(196, 199, 197);
@@ -0,0 +1,21 @@
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -1235,6 +1235,7 @@ void VideoOverlayWindowViews::SetUpViews
base::Unretained(this)));
live_caption_button->SetSize(kActionButtonSize);
live_caption_button->SetIsLiveCaptionDialogOpen(false);
+ live_caption_button->SetVisible(false);
auto live_caption_dialog = std::make_unique<OverlayWindowLiveCaptionDialog>(
Profile::FromBrowserContext(
@@ -2350,8 +2351,8 @@ void VideoOverlayWindowViews::OnLiveCapt
SetLiveCaptionDialogVisibility(!live_caption_dialog_->GetVisible());
}
-void VideoOverlayWindowViews::SetLiveCaptionDialogVisibility(
- bool wanted_visibility) {
+void VideoOverlayWindowViews::SetLiveCaptionDialogVisibility(bool) {
+ const bool wanted_visibility = false;
if (wanted_visibility == live_caption_dialog_->GetVisible()) {
return;
}

Some files were not shown because too many files have changed in this diff Show More