Compare commits

..

649 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
wukko 39cd99cc8d revision: bump to 2 (#768) 2026-01-18 01:50:15 +06:00
jj 8ca6ce276b helium/cat: prevent profile button from being collapsed (#767)
Fixes #440
Fixes (maybe) #657
2026-01-17 20:06:57 +01:00
jj 6af846d7a3 domain_regex.list: exclude chromiumapp.org from substitution
fixes #545 (related: ungoogled-software/ungoogled-chromium#3597)

used by chromium for extension oauth flow. chromium just intercepts the request and takes the token
2026-01-17 12:00:31 +00:00
jj 7d014c2076 domain_substitution.list: regenerate
not sure how that happened, looks like a botched merge
cb4f6ca17b
2026-01-17 11:40:19 +00:00
wukko 7cc336dcb2 update: helium 0.8.1 (chromium 144.0.7559.59) (#751) 2026-01-17 02:05:04 +06:00
wukko d57e242e5e revision: reset to 1 2026-01-17 01:58:27 +06:00
wukko 26252d38c2 helium/core: introduce helium noise, redo anti-fingerprinting
Chromium's canvas noising was mostly removed in 3 parts, which
landed in 144:
1. https://crrev.com/1537919
2. https://crrev.com/1538396
3. https://crrev.com/1538814

Prior to 144, Helium relied on Chromium's implementation of Canvas
noising for fingerprinting protection, as it was the best option at
the time. Now that it's no longer available, we had to either revert
the removal, or come up with our own implementation.

Helium Noise is something in-between: it builds on top of Chromium's
implementation, but removes extras and extends it further.

Key highlights of this implementation:
- Completely independent, doesn't rely on any remaining bits of
  Chromium's deprecated implementation.
- Noise isn't locked to just Canvas, it's built with extensibility
  in mind, so we can implement fingerprint deception for more browser
  APIs in the future.
- Noise generates unique BrowserContext tokens per feature
  (kCanvas, kAudio, etc) to prevent (highly unlikely) correlation. Aka
  the way it should be implemented.
- Canvas is noised only during readback, just like in Chromium's
  implementation.
- Canvas noising works without hardware acceleration unlike Chromium's
  implementation.

I've also updated AudioContext fingerprint deception to use Helium Noise,
just like Canvas. This should fix #249, because AudioContext fingerprint
is now consistent within an origin and BrowserContext. More testing is
needed, as I'm unable to replicate the original issue on previous builds.
2026-01-17 01:58:20 +06:00
wukko d9282c041e devutils/lint_tests: add DEPS to license header ignores 2026-01-17 01:36:06 +06:00
wukko edea8fe4f7 helium/ui/caption-bounds: fix caption bounds width on old macos 2026-01-17 01:33:23 +06:00
wukko ff09b25f95 helium/core/exclude-flags: remove irrelevant flags added in M144 2026-01-17 01:32:40 +06:00
wukko cb4f6ca17b patches: update and refresh for chromium 144.0.7559.59 2026-01-17 01:32:29 +06:00
wukko 2f826d1ee9 merge: update to ungoogled-chromium 144.0.7559.59 2026-01-12 13:32:42 +06:00
Blaise e8f5addcff Update to Chromium 144.0.7559.59 2026-01-08 08:38:22 -06:00
wukko b6e5b77e31 revision: bump to 10 (#729) 2026-01-07 09:33:12 +00:00
wukko 5903dd18e8 chromium: update to 143.0.7499.192 (#728)
fixes CVE-2026-0628 (TBD)
2026-01-07 15:28:37 +06:00
Blaise 868121c2fc Update to Chromium 143.0.7499.192 2026-01-06 14:24:49 -06:00
jj 0c355bda1b helium/ui: add proper error when extension services are disabled (#718) 2026-01-06 12:14:50 +06:00
wukko 00501e2311 revision: bump to 9 (#699)
pretty embarrassing but i think the 2px diff in #698 makes a big
difference
2026-01-02 19:57:16 +00:00
wukko 114aca58c5 deps: update onboarding (#698) 2026-01-02 19:45:18 +00:00
wukko 8b563c0d01 revision: bump to 8 (#697) 2026-01-02 18:43:02 +00:00
wukko 824cf71ff3 deps: rename extras into deps & update onboarding (#696)
extras were never extra, so this fixes the possible confusion
2026-01-03 00:38:29 +06:00
wukko 63be29609d deps: update onboarding 2026-01-03 00:24:08 +06:00
wukko d1cdab8975 repo: extras.ini -> deps.ini 2026-01-03 00:21:37 +06:00
jj b5c22404c6 ci/bump-platform: export versions, add platform-specific hooks (#688) 2025-12-31 18:47:01 +01:00
wukko d6f4210a41 patches/ungoogled: remove irrelevant/outdated/duplicate patches (#680)
- `inox-patchset/disable-missing-key-warning.patch`: same behavior as
`debian/disable-google-api-warning.patch`, but one level lower. makes no
sense to keep both.
- `ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch`:
irrelevant to helium, and also it is a bad flag
- `ungoogled-chromium/enable-page-saving-on-more-pages.patch`: outdated
or initially useless
- `ungoogled-chromium/disable-download-quarantine.patch`: i understand
why ungoogled has this patch, but helium should allow the OS to
vet/quarantine downloaded files. this is not related to safe browsing.
- `ungoogled-chromium/fix-distilled-icons.patch`: weird workaround +
helium doesn't ship a reading mode, the only place where this could've
been potentially used
- `ungoogled-chromium/add-flag-for-tabsearch-button.patch`: helium hides
the tab search button by default, with an option to enable it in the
toolbar
- `ungoogled-chromium/add-flag-for-qr-generator.patch`: outdated and
irrelevant, the qr code generation entrypoint hasn't been in the address
bar for many years
- `ungoogled-chromium/add-flag-to-disable-sharing-hub.patch`: same as qr
code generator, the sharing hub entry point hasn't been in the address
bar for many years
- `ungoogled-chromium/enable-extra-locales.patch`: irrelevant to helium.
basically extra bloat, considering regular chrome doesn't ship these
2025-12-30 23:55:45 +06:00
jj a939d1d8b0 revision: bump to 7 (#651) 2025-12-20 17:03:53 +01:00
wukko 76fbefad51 merge: update to chromium 143.0.7499.169 (#644) 2025-12-19 13:18:55 +06:00
wukko 95a1030f70 merge: update to ungoogled-chromium 143.0.7499.169 2025-12-19 10:46:35 +06:00
Blaise 7375679377 Update to Chromium 143.0.7499.169 2025-12-18 14:54:01 -06:00
wukko 2ee49a1059 helium/ui: shrink pdf viewer's ui (#634)
- shrunk the toolbar padding
- shrunk the side panel with thumbnails
- fixed different font sizes in the toolbar
- made file title a bit smaller, reduced its margin
- remade the stroke of the selected thumbnail

as a result, a lot more content fits on the screen at once!
2025-12-18 23:58:34 +06:00
wukko 1be2432a9a revision: bump to 6 (#633)
bumping asap to get the security patch out fast
2025-12-17 14:27:41 +06:00
wukko 5d96434aa0 merge: update to chromium 143.0.7499.146 (#632) 2025-12-17 14:14:30 +06:00
wukko 56d1a136ab patches: refresh for chromium 143.0.7499.146 2025-12-17 12:07:35 +06:00
wukko 688af14009 merge: update to ungoogled-chromium 143.0.7499.146 2025-12-17 11:37:41 +06:00
Blaise 1341de3a37 Update to Chromium 143.0.7499.146 2025-12-16 14:14:37 -06:00
wukko 4e6eda294f revision: bump to 5 (#623) 2025-12-15 13:46:38 +00:00
wukko f32b04755e helium/ui: fix pwa toolbar & location bar layout (#620) 2025-12-15 08:56:28 +00:00
wukko 75d044b9a6 helium/ui/tabs: fix in-place pinned tab muting/unmuting (#619)
fixes #586
2025-12-15 14:53:17 +06:00
wukko 0ec967b7d6 helium/ui/cat: fix layout breakage when exiting fullscreen, again (#616) 2025-12-14 16:01:08 +06:00
wukko 5354646288 revision: bump to 4 (#607) 2025-12-12 16:46:36 +00:00
jj f03eea9638 extras: update onboarding (#605) 2025-12-12 17:12:54 +01:00
wukko 42e783c0bb merge: update to chromium 143.0.7499.109 (#601) 2025-12-12 18:14:27 +06:00
wukko 4cfbfe2710 patches: refresh for chromium 143.0.7499.109
removed upstream-fixes/fix-macos-fullscreen-ui-breakage.patch because it's been merged into M143 upstream :D
2025-12-12 18:11:24 +06:00
wukko 7c51e1f0f6 merge: update to ungoogled-chromium 143.0.7499.109 2025-12-12 18:11:24 +06:00
wukko b45d47cf07 extras: update onboarding (#603)
adds accommodations for the services schema & component updates
2025-12-12 12:08:40 +00:00
wukko c4482c5655 helium/core/services: component updates and schema 1 changelog (#591) 2025-12-12 18:00:15 +06:00
wukko 8930f2ae91 helium/core/services: add description & first changelog 2025-12-12 17:56:36 +06:00
wukko 714939df2c helium/core/components: descriptive helium services state error
now components show an error about disabled helium services if autoupdating is disabled
2025-12-12 17:35:32 +06:00
wukko db5ddc92c1 helium/core/components: restrict installation to an allowed set
just CRLSet for now. more to come in the future as we progressively vet them
2025-12-12 17:35:32 +06:00
wukko e64526ce10 helium/core: component updates via helium services
managed by the same toggle as general browser updates
2025-12-12 17:35:27 +06:00
wukko b82e2921d4 helium/core: add helium services versioning & update alerts (#599) 2025-12-12 15:34:03 +06:00
wukko a16ae4bd88 helium/core/services-nag: update strings 2025-12-12 14:00:23 +06:00
wukko 07018baf2e helium/core/services: polish the schema update notification
- adjusted padding, margins, and border radius
- made the title stand out more
- updated related strings
- removed the extra description, feels unnecessary to me
2025-12-12 13:59:46 +06:00
jj f4937943ca helium/core/onboarding: format and add "acceptLatestSchema" call 2025-12-11 23:43:48 +00:00
jj d27f87f754 helium/core: add helium services versioning/changelog
also move stringprintf import in helpers to correct patch
2025-12-11 23:43:48 +00:00
jj a2b3cd02bb devutils/lint: fix all_new_headers_have_correct_guard test 2025-12-11 23:43:48 +00:00
Blaise 20915c82d9 Update to Chromium 143.0.7499.109 2025-12-10 13:46:06 -06:00
wukko 7c45f2fcd6 revision: bump to 3 (#587) 2025-12-09 16:12:11 +00:00
wukko 8cb698e496 helium/ui/cat: fix order of early CAT layout return (#583)
fixes #576
2025-12-09 21:32:33 +06:00
wukko 009a2e74c7 helium/ui/cat: fix crash when opening the guest window (#577)
extensions container is nullptr there, so trying to set its flex property was causing a crash
2025-12-09 15:54:48 +06:00
wukko b06b34b5e9 revision: bump to 2 (#573) 2025-12-07 14:55:31 +06:00
wukko b102956f52 revision: bump to 2 2025-12-07 14:52:24 +06:00
jj 1676a4071e patches/spellcheck: update error to mention helium services (#572) 2025-12-07 09:40:46 +01:00
jj 89699b019b patches/disable-crash-reporter: re-enable crashpad on Linux 2025-12-04 17:13:40 +00:00
wukko 9b49458bc2 helium/ui: keep pinned extensions in CAT & reduce grab handle (#562) 2025-12-04 21:15:46 +06:00
wukko b3733ec6aa helium/cat: remove tab strip grab handle
cuz it takes up too much of precious space
2025-12-04 16:20:56 +06:00
wukko ac863716dd helium/cat: prevent pinned extensions from shrinking 2025-12-04 16:20:25 +06:00
wukko 05ab79d610 helium/ui/grab-handle: slightly reduce the size 2025-12-04 15:51:18 +06:00
wukko e67c0db58f patches: move everything from contrib to root dir (#557)
now all chromium patches in all helium repos follow
the same dir pattern: `<vendor>/<group>/<...>/<patch>`

and there's no longer a "contrib" dir which was admittedly
kind of confusing
2025-12-04 01:43:34 +06:00
wukko 8041351f2b merge: update to chromium 143.0.7499.40 (#544) 2025-12-03 23:38:34 +06:00
wukko 2fd8ab8736 revision: reset to 1 2025-12-03 23:22:46 +06:00
wukko bb720ee09f helium/settings: remove dead sections from profiles page
prevents dead section flickering on page init
2025-12-03 23:20:20 +06:00
wukko 3175ba89bd helium/ui: merge two caption button bounds patches
and remove the windows (os) workaround cuz the new layout doesn't use it
2025-12-03 23:20:20 +06:00
wukko 1d218c894b helium/ui/cat: reduce horizontal toolbar margin 2025-12-03 23:20:20 +06:00
wukko 3e07bd785f helium/ui: fix caption bounds (only on macos for now)
merged the related patch from macOS repo into this one and added new changes. it makes sense to keep it here as it's a "main helium" kind of change, not some platform quirk.

i'm not sure whether macOS 15 bounds are correct, however, so this will probably be patched up more in the future.
2025-12-03 23:20:19 +06:00
wukko a3072fedab upstream-fixes: fix broken fullscreen ui on macos
caption buttons bounds were incorrectly interpreted and this patch (crrev.com/1538756) fixes it by always using hard-coded constants
2025-12-03 23:20:19 +06:00
wukko a749a3e3e2 helium/ui: fix toolbar padding due to upstream changes
...again
2025-12-03 23:20:19 +06:00
wukko d145111dd0 helium/core/exclude-flags: remove irrelevant flags added in M143 2025-12-03 23:20:19 +06:00
wukko 2ce45ab9f2 patches: refresh and update for chromium 143.0.7499.40 2025-12-03 23:20:19 +06:00
wukko ab9a39c516 merge: update to ungoogled-chromium 143.0.7499.40 2025-12-03 23:19:47 +06:00
Blaise 7b77584e8c Update to Chromium 143.0.7499.40 2025-12-02 14:14:43 -06:00
jj bcf3330b42 patches/fixes: clean up obsolete upstream fixes
These are not needed anymore AFAICT, ungoogled-chromium
builds fine for me on Linux and macOS without them.
2025-11-30 20:26:37 +00:00
jj a2d63db83b patches/bangs: accept trailing bangs with enter key (#530) 2025-11-29 16:14:40 +01:00
wukko b3f08938ce revision: bump to 9 (#534) 2025-11-29 16:56:06 +06:00
jj 4a95606bfa helium/appearance: re-enable gtk/qt buttons (#531)
the agnostic theme will still be the default, but this
will re-enable the use gtk/qt buttons for whoever wants
to use the GTK/QT themes for whatever reason

fixes imputnet/helium-linux#74
2025-11-29 15:50:41 +06:00
wukko 76462eb66c helium: add an option to use MRU order when tabbing thru tabs (#529)
closes #111
2025-11-28 14:26:40 +01:00
wukko ec8480c3f5 helium/settings: add behavior section to the appearance page (#528)
- made the appearance subpage open first by default when opening the settings page
- moved all behavioral toggles to the new section within the appearance page
- renamed the appearance page to "Appearance and behavior"
- replaced the palette icon with a more diverse one
- moved helium/ui/settings-page-icons.patch to helium/settings/settings-page-icons.patch
- cleaned up patch order inside helium/core/open-new-tabs-next-to-active-tab-option.patch to be more readable
2025-11-28 19:14:24 +06:00
Sheng c94c96e62e Fix zip compression level (#3555) 2025-11-27 09:17:28 -06:00
wukko fa41ca5fca patches: merge extra & core into contrib, clean up files (#527)
merged extra & core folders into one "contrib" folder

removed useless/outdated patches:
- upstream-fixes/hardware_destructive_interference_size.patch
- iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
- iridium-browser/Remove-EV-certificates.patch
- inox-patchset/0016-chromium-sandbox-pie.patch
- upstream-fixes/glue_core_pools.patch

merged patches:
- iridium-browser/safe_browsing-disable-incident-reporting.patch and iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch into iridium-browser/safe-browsing-disable-reporting.patch

renamed patches:
- removed sequence numbers from inox patch filenames
2025-11-27 17:53:54 +06:00
wukko 9df88459b8 helium/core: override browser protocol in copied url and tab card (#526) 2025-11-26 15:27:56 +01:00
wukko 7e1d9dd767 upstream-fixes/macos-widget: update to prevent parent overlap (#523)
fixes the main window being clipped by the menu bar

partial copy of chromium/chromium@4f0076b
2025-11-26 11:01:02 +01:00
wukko ccb227dc03 helium/ui: remove zoom page action (#519)
cleans up space, eliminates "zoom shaming". i just like scaling down
websites without being constantly reminded about it. safari behaves the
same way as helium does with this change, and no one complains, so i
guess it's fine :3
2025-11-26 00:23:42 +06:00
wukko 94fa070851 helium/ui/tabs: tab muting, move indicator to left (#517)
- enabled the tab muting feature by default
- fixed the UX issue with the alert indicator and the close button
  swapping places on hover
- increased the minimum width for close buttons to prevent mute &
  close buttons from overlapping each other
- removed the fade animation from the indicator

closes #324
2025-11-24 20:46:58 +06:00
jj 1a266da9a3 devutils/lint: add rule to detect whitespace-only changes (#510) 2025-11-24 14:38:36 +06:00
wukko 6312142913 helium/ui/toolbar: remove cookie controls from pwa toolbar (#509) 2025-11-23 11:35:35 +00:00
wukko 64ef95a6eb helium/core: disable ntp footer (#508)
fixes #237
2025-11-23 17:31:14 +06:00
jj a7e5433e7c helium/override-protocol: use helium:// in omnibox suggestions (#505) 2025-11-22 13:33:13 +00:00
jj 4f803de791 helium/cat: elide location icon text when in CAT mode (#506) 2025-11-22 13:37:50 +01:00
jj aebf0a4387 devutils/platform_patches: update shared patches instead of deleting
Instead of deleting copies of generic patches when unmerging them
from platform patches, move them back into the shared repository.

This makes it much more pleasant and ergonomic to work on patches
as a merged series, and allows to e.g. refresh existing patches
without having to move them back to the original folder manually.
2025-11-21 17:45:08 +00:00
jj be8ba95803 ci/bump-platform: add disk space clearing step (#495) 2025-11-19 23:22:06 +06:00
wukko c3ba3d8999 revision: bump to 7 (#494) 2025-11-19 15:46:26 +00:00
wukko 403e3fe01d helium/ui: detach find bar from location bar, fix padding (#493)
- no longer animates from the middle of the toolbar
- no longer feels awkward in CAT layout
- just looks better
2025-11-19 16:39:31 +01:00
wukko 5ee42465ab helium/flags: drop unsupported OSes from kOsAll and kOsDesktop (#492) 2025-11-19 09:00:37 +00:00
wukko aa487a75cd helium/ui/caption-button: remove linux adjustments (#491) 2025-11-19 14:55:47 +06:00
wukko 24b594f89e helium/cat: prevent pinned collapse, fixed address bar width flag (#490)
fixes #443
2025-11-19 14:37:21 +06:00
wukko 6a1cd43391 revision: bump to 6 (#484) 2025-11-18 10:48:00 +00:00
wukko 675cf80cde helium/cat: prevent common actions from going into overflow menu (#457)
fixes #438
fixes #440
2025-11-18 16:41:07 +06:00
wukko 0008cd2cec helium/cat: remove extra empty line 2025-11-18 16:37:38 +06:00
wukko fece071fb4 Merge branch 'main' into cat-fix-burgering 2025-11-18 16:19:34 +06:00
wukko 43dfac4447 merge: update to chromium 142.0.7444.175 (#482) 2025-11-18 15:34:51 +06:00
wukko 5d33305095 patches: refresh for chromium 142.0.7444.175 2025-11-18 14:55:15 +06:00
wukko 52dc69ac18 merge: update to ungoogled-chromium 142.0.7444.175 2025-11-18 14:37:17 +06:00
Blaise 633d41748b Update to Chromium 142.0.7444.175 2025-11-17 15:20:48 -06:00
wukko c8a824ec85 upstream-fixes/macos-rect: fix on old macos too (#480)
fixes #437
2025-11-17 21:18:06 +06:00
wukko 1fe645253d helium/cat: fix DCHECK & layout breakage when entering fullscreen (#476)
fixes #446
2025-11-17 18:26:50 +06:00
wukko a4f89dfb1c helium/cat: fix mini toolbar bounds in popup windows (#472)
fixes #439
2025-11-16 15:10:20 +00:00
jj 13f49f28cc helium/location-bar: fix trailing icon size & padding, fix intent (#456)
Co-authored-by: wukko <me@wukko.me>
2025-11-16 21:06:19 +06:00
jj e9a04a2ccf patches/split-view: fix crash when opening link from pdf (#466)
essentially a backport of chromium/chromium@c992846254

fixes #465
2025-11-15 19:59:29 +00:00
jj 80dfd780db gitattributes: remap patches to c++ (#464) 2025-11-15 13:53:18 +00:00
jj c9a0eaf2c0 helium/cat: make common icons always stay unburgered 2025-11-14 22:16:56 +00:00
jj 9f7755dbd7 helium/core: fix chrome.instanceID.getID() hanging (#449) 2025-11-13 20:00:13 +01:00
Kurt Fitzner 110cab3432 Update README.md to include Ubuntu distribution (#3536) 2025-11-13 07:52:14 -06:00
wukko 0f9df28d13 merge: update to chromium 142.0.7444.162 (#433) 2025-11-13 03:07:23 +06:00
wukko 060fa834e5 revision: bump to 5 2025-11-13 03:01:27 +06:00
wukko be47d96c1f patches: refresh for 142.0.7444.162 2025-11-13 03:00:09 +06:00
wukko f049404ad5 merge: update to ungoogled-chromium 142.0.7444.162 2025-11-13 02:46:38 +06:00
jj 232f940dbd ungoogled/existing-switches: fix webrtc switch flag values (#426)
fixes #425
2025-11-12 20:41:07 +00:00
wukko b3d929f6e2 helium/ui: new experimental layout, refactor tabs & omnibox (#427)
- added new experimental one-line top container UI layout behind `#helium-cat-ui` flag
- updated tab groups ui: fixed margins, updated header colors to be less blinding, and moved the line to top to prevent visual clashing with the location bar
- fixed the tab strip alignment on windows, linux, and in fullscreen mode on macos
- reduced tabs' outer margins & width
- refactored omnibox sizing, removed the glitchy border, fixed the macos-specific positioning issue by applying a fresh upstream fix
- refactored `layout-constants` to be more flexible for new ui layouts
2025-11-13 02:36:13 +06:00
wukko 5f296ba37d helium/ui: finally align the tab strip with toolbar buttons
on windows, linux, and fullscreen on mac
2025-11-13 01:58:15 +06:00
wukko 3668280470 upstream-fixes: fix misplaced omnibox popup due to rect constrains
fixes imputnet/helium-macos/issues/67
2025-11-13 01:58:15 +06:00
wukko 673aaf7698 helium/ui/tabs: update tab group ui, fix ntp button overlap, fix padding
- tab group header is now positioned properly
- tab group header is now colored like bookmarked tab groups
- moved tab underline to top to prevent visual clashing with the location bar, made it skinnier
- new tab button no longer sits on top of tabs, caused by minified outer margins of tabs
- fixed padding inside tabs to be visually 6px everywhere
2025-11-13 01:58:15 +06:00
wukko 9113a4cda7 helium/ui/omnibox: refactor sizing, remove stroke 2025-11-13 01:58:14 +06:00
wukko e9de843abe helium/ui: add experimental compact (one-line) toolbar 2025-11-13 01:58:06 +06:00
Blaise 367118d103 Update to Chromium 142.0.7444.162 2025-11-11 13:21:42 -06:00
wukko 8da7b370f7 helium/ui/tabs: reduce outer margins & width 2025-11-08 20:17:12 +06:00
wukko 06a3ebf3d3 helium/ui/layout-constants: refactor to avoid value duplication
and simplify future maintenance
2025-11-08 20:16:42 +06:00
wukko 4991dcc364 revision: bump to 4 (#415) 2025-11-07 20:31:51 +00:00
wukko 7222174274 helium/toolbar: options for hiding back, reload, and menu buttons (#414)
also:
- refactored related patches
- reordered & sorted toolbar options in the customization side panel
- added "customize helium" option to browser window's context menu
2025-11-08 02:27:05 +06:00
wukko 2315522ef2 helium/core: add "customize helium" option to window's context menu 2025-11-08 02:22:54 +06:00
wukko dc61f5cf4f helium/toolbar: add prefs for hiding back, reload, and main menu buttons 2025-11-08 02:22:47 +06:00
wukko 8486eb8436 helium: merge toolbar prefs, move to ui 2025-11-07 19:06:33 +06:00
jj 537ba368e9 helium/core: return "Google Chrome" as browser brand (#408) 2025-11-07 12:10:20 +00:00
jj 61c7f706eb helium/devtools: fix building with sync ripped out (#409) 2025-11-07 12:55:41 +01:00
jj ee6294e217 patches/upstream-fixes: fix warning when building with py3.14 (#410) 2025-11-07 10:16:07 +01:00
wukko e3bcfa4148 merge: update to chromium 142.0.7444.134 (#402) 2025-11-07 01:06:43 +06:00
wukko 4700d1bc7e patches: refresh and update for 142.0.7444.134
`force-eu-search-features.patch` had notable changes for [7102578](https://chromium-review.googlesource.com/c/chromium/src/+/7102578)
2025-11-07 00:11:50 +06:00
wukko 617bd4b75e merge: update to ungoogled-chromium 142.0.7444.134 2025-11-07 00:11:46 +06:00
wukko 7b31f0b137 extras: update onboarding to 202511061712 (#407) 2025-11-06 17:52:26 +00:00
jj 7815dd5522 helium/devtools: remove "account" section from settings (#405)
Fixes #400
2025-11-06 17:10:15 +00:00
jj 48577b920b helium/core: fix ublock origin being re-enabled when updated (#404) 2025-11-06 17:10:39 +01:00
Blaise a264ac047d Update to Chromium 142.0.7444.134 2025-11-06 06:07:35 -06:00
wukko eaf2714853 helium/ui: add window frame hit test to toolbar (#395)
allows for the toolbar to be the handle for window dragging.
prerequisite for vertical tabs and other UI experiments 👀
2025-11-04 18:12:30 +06:00
wukko cc1db76e65 ungoogled/existing-switches: fix order of webrtc policy pref (#390) 2025-11-04 13:39:10 +06:00
jj ae476a674c patches/upstream-fixes: add fix for connectors_service_ CHECK 2025-11-03 15:44:30 +00:00
Andreas Stieger 74779ebab4 add openSUSE instructions (#3527) 2025-11-02 12:57:24 -06:00
Mrugesh Mohapatra 70627f67f4 github: add well-known funding file for ownership verification (#364) 2025-11-02 17:28:46 +06:00
jj c50904a16e revision: bump to 3 2025-11-01 18:17:51 +00:00
jj 2300b0f239 patches/upstream-fixes: add fix for connectors_service_ CHECK 2025-11-01 18:17:21 +00:00
wukko 19d1c7fa61 helium/core/exclude-flags: remove irrelevant flags added in M142 (#372) 2025-10-31 21:23:50 +00:00
wukko 36f1f56e6a revision: bump to 2 (#375) 2025-10-31 11:49:13 +00:00
wukko 0455a0ebc1 patches: don't prevent url elisions by default (#373) 2025-10-31 17:17:39 +06:00
wukko 34ebe96fcc helium/core: webrtc "public interface only" default policy (#371)
closes #308
closes #360
2025-10-31 15:58:35 +06:00
wukko 0198aeaac1 helium/core/autoscroll: enable by default only on windows (#370)
closes #369
2025-10-31 15:43:31 +06:00
wukko 7c6d64e244 revision: reset to 1 (#367) 2025-10-31 01:14:05 +06:00
wukko eadab75c6e revision: reset to 1 2025-10-31 01:09:01 +06:00
wukko 0366b01487 merge: update to chromium 142.0.7444.59 (#363) 2025-10-31 01:02:10 +06:00
wukko 83a38925d8 helium/ui/top-container: fix background color introduced in M142 2025-10-30 22:36:45 +06:00
wukko c12e746219 patches: refresh & update for chromium 142 2025-10-30 22:36:02 +06:00
wukko 9cfd581f96 merge: update to ungoogled-chromium 142.0.7444.59 2025-10-29 13:11:23 +06:00
Blaise 6a7a75d0d4 Update to Chromium 142.0.7444.59 2025-10-28 17:37:26 -05:00
wukko e0995b8b42 helium: fix crash when creating a split in tab group with a detached tab
taken from upstream:
[7032449](https://chromium-review.googlesource.com/c/chromium/src/+/7032449)

fixes #345
2025-10-27 18:26:18 +06:00
jj c7275e01d6 helium/services: disable webui toggle if onboarding is incomplete (#344) 2025-10-26 20:36:31 +01:00
jj 3952195984 helium/bangs: fix missing categories, refactor loading algorithm (#348) 2025-10-26 20:41:29 +06:00
wukko d7451e760c revision: bump to 8 2025-10-22 23:44:01 +06:00
wukko efaf686acf merge: update to ungoogled-chromium 141.0.7390.122 2025-10-22 23:36:47 +06:00
Blaise 0b535463d6 Update to Chromium 141.0.7390.122 2025-10-21 14:55:59 -05:00
wukko 792a3d0dfa revision: bump to 7 2025-10-18 02:24:28 +06:00
jj bf550b7cb2 ci: remove new version check workflow (#284) 2025-10-17 20:21:04 +00:00
wukko b2050c2c8b helium/ui: remove link to password manager from passkey autofill popover 2025-10-18 02:06:18 +06:00
wukko ec7340c086 helium/core: enable autoscroll on linux by default, add a flag
closes #233
2025-10-18 02:06:18 +06:00
wukko 35fe39c483 helium/core/helium-versioning: fix --version & --product-version output
closes #193
2025-10-18 02:06:17 +06:00
wukko 2e9125d326 helium/core/keyboard-shortcuts: unprotect inspect & console actions
they're not as important as the general ability of toggling dev tools,
so it's best to allow web pages to override them. fixes an issue with
google docs keyboard shortcuts.
2025-10-18 02:05:17 +06:00
Joshua Higgins e347cca951 helium/split-view: close only the active tab in split view via ⌘W (#285) 2025-10-18 02:01:20 +06:00
Shannon Skipper 2a79cab2b4 Update preload pages setting link (#3509) 2025-10-17 07:58:34 -05:00
jj 256b83e902 helium/bangs: fix overly optimistic bang autocomplete (#281)
fixes #223
2025-10-17 11:15:14 +00:00
jj f7ad164068 extras: bump ublock to 1.67.0 (#275) 2025-10-17 11:02:26 +00:00
jj ed72676c85 helium/default-browser-reject: trigger dismiss action on cancel (#278) 2025-10-17 12:58:25 +02:00
wukko b3031f79b3 revision: bump to 6 2025-10-16 00:08:32 +06:00
wukko ab6faeaed9 patches: refresh for chromium 141.0.7390.107 2025-10-15 14:11:45 +06:00
wukko 5bf2bc5966 merge: update to ungoogled-chromium 141.0.7390.107 2025-10-15 13:54:59 +06:00
wukko 68ef8ffe61 helium/core: disable fedcm login nag bubble 2025-10-15 13:05:12 +06:00
Blaise 11b9b4f0eb Update to Chromium 141.0.7390.107 2025-10-14 15:34:56 -05:00
jj fd4e3ec87b helium/core: add "do not show again" to default browser nag (#264) 2025-10-14 21:52:17 +02:00
jj 7f886834a7 helium/split-view: reload only focused half of split view (#263)
fixes #118
2025-10-14 18:24:24 +02:00
wukko 1c4ad07e9c helium/core/keyboard-shortcuts: protect tab search action
discord hijacks it with a useless action, and seemingly no other web app uses cmd+shift+a for anything
2025-10-14 21:55:48 +06:00
wukko ce80c9748f helium/core: toggle for ⌘+Shift+C, add ⌘+Shift+E as element inspector
- added a pref and a toggle in accessibility settings for controlling the state of ⌘+Shift+C'sbehavior and restoring inspector functionality.
- added helium's own command specifically for ⌘+Shift+C shortcut to prevent any unexpected breakage or side effects.
- assigned ⌘+Shift+E to enable element inspector on all platforms, since ⌘+Shift+C copies the URL by default.
- updated the inspector's keyboard shortcut in devtools tooltip to display ⌘+Shift+E.
- assigned ⌘+Shift+I to open devtools on macos. previously it enabled the inspector, but it makes more sense to unify the keyboard combo effects across platforms. now ⌘/Ctrl+Shift+I toggles devtools on all platforms in the same way.
- merged `copy-page-url-shortcut.patch`, `protect-browser-keyboard-shortcuts.patch`, and macos' `replace-email-shortcut-with-devtools.patch` into `keyboard-shortcuts.patch`

closes #96
2025-10-14 21:21:04 +06:00
Noa Virellia ea61e0bcd5 utils/{generate,replace}_resources: add shebang 2025-10-10 12:44:58 +08:00
Noa Virellia d813f47f4e utils: make utility scripts executable 2025-10-10 12:37:47 +08:00
Blaise dd24681d9d Update to Chromium 141.0.7390.76 2025-10-09 16:09:06 -05:00
wukko 50e0255fe2 revision: bump to 5 2025-10-08 16:40:10 +06:00
wukko b735b3ae1d helium/core: disable non-milestone update toast
disables the "Helium was updated" toast in top right. just unnecessary imo.
2025-10-08 16:39:43 +06:00
wukko 115cf2e55a revision: bump to 4 2025-10-08 14:39:38 +06:00
wukko 7022a9e02e helium/core/component-schema: fix file path construction on windows 2025-10-08 14:34:17 +06:00
wukko 9fc0ab1720 patches: refresh for 141.0.7390.65 2025-10-08 14:29:42 +06:00
wukko abb3c6628a merge: update to ungoogled-chromium 141.0.7390.65 2025-10-08 14:19:51 +06:00
Blaise f62b1281a3 Update to Chromium 141.0.7390.65 2025-10-07 14:52:02 -05:00
wukko f46cc85e7c revision: bump to 3 2025-10-07 20:34:30 +06:00
jj 6f6679d446 helium/search: move search patches into core subdir 2025-10-07 13:57:35 +00:00
jj 662041df27 helium: consolidate search engine patches
- move all search patches together in series
- extract google re-config into separate patch
- merge kagi + ddg patch into consolidated "search
  engine defaults" patch
2025-10-07 13:46:46 +00:00
wukko 86710deb6a helium/ui/tabs: fix tab groups ui
- tabs no longer have a stroke when they're in a tab group
- the line under the tab group no longer jumps in size depending on a selected tab and is properly aligned
2025-10-07 18:57:20 +06:00
thenhnn 8f51e9f904 helium/core: add an option to open new tabs next to active one (#210) 2025-10-07 18:56:27 +06:00
wukko f01e2d502a helium/ui/tabs: fix unexpected shifting on hover
fixes #127
2025-10-07 01:06:07 +06:00
wukko 5ed9e4cff3 helium/core: exclude broken/irrelevant flags 2025-10-07 00:29:23 +06:00
wukko 0fbca2dcbd helium/core: disable touch ui 2025-10-06 23:33:53 +06:00
wukko 1da4771ecd helium/hop/pwm: refactor 2025-10-06 23:32:56 +06:00
jj 7cc782cf18 helium/core: load managed storage manifests for component extensions
fixes #209
2025-10-06 16:17:53 +00:00
jj eff0437c87 helium/settings: re-enable fedcm settings page 2025-10-06 13:22:26 +00:00
jj 6eaf98d1c5 patches/ungoogled-chromium: re-enable fedcm requests
fixes #158
2025-10-06 13:22:26 +00:00
jj 739f2f2fd2 helium/ui: remove webstore link from theme side panel page
fixes #102
2025-10-06 13:22:26 +00:00
Joshua Higgins 1fd0941818 helium/settings: display Quad9 option in Secure DNS settings (#188) 2025-10-04 18:20:07 +02:00
wukko 12534c0398 ci/bump-platform: update bot user to helium-bot 2025-10-04 20:25:59 +06:00
wukko 67bf782dac revision: bump to 2 2025-10-04 19:54:29 +06:00
wukko 62b06ba077 helium/ui: remove dead page actions from pwa toolbar
fixes #192
2025-10-04 19:53:04 +06:00
wukko b066056346 revision: reset to 1 2025-10-04 03:23:57 +06:00
wukko 139c0cfa36 resources/branding: update bg color in skia product_logo_color 2025-10-04 03:22:28 +06:00
wukko 0d7f1ab5fe helium/core: allow infinite tab freezing for better performance
a lot more tabs will be allowed to be unloaded from background if the user has a ton of them open, to keep relevant tabs fast and resource footprint small
2025-10-04 03:10:09 +06:00
wukko 6f004aa444 helium/core: enable parallel downloading by default 2025-10-04 03:10:09 +06:00
wukko 6f18e3293c helium/core: disable ad topics/groups api entirely 2025-10-04 03:10:09 +06:00
wukko b11373dc1f helium/core: reduce "accept-language" headers 2025-10-04 03:10:09 +06:00
wukko 2d19e843bd helium/core: mitigate fingerprinting of audio context 2025-10-04 03:10:02 +06:00
wukko 00af1fcf09 helium/core: increase incognito storage quota by default
to make it harder to detect incognito

migrated from ungoogled flag, always enabled
2025-10-04 02:21:45 +06:00
wukko 01541411bb helium/core: canvas noising for reducing fingerprinting 2025-10-04 02:21:40 +06:00
wukko a56d8adbf9 helium/core: merge unthemify-onboarding-favicon into onboarding-page 2025-10-02 23:45:27 +06:00
wukko d2a745498b patches: refresh for chromium 141.0.7390.54 2025-10-02 18:39:26 +06:00
wukko 13d2de5691 merge: update to ungoogled-chromium 141.0.7390.54 2025-10-02 18:00:29 +06:00
Blaise f07f00bad4 Update to Chromium 141.0.7390.54 2025-10-01 13:06:27 -05:00
wukko 851ffe6c62 revision: bump to 13 2025-09-26 13:41:19 +03:00
wukko c7434cb02e merge: update to ungoogled-chromium 140.0.7339.213 2025-09-26 11:14:35 +03:00
Blaise 62c15e6720 Update to Chromium 140.0.7339.213 2025-09-25 16:22:07 -05:00
jj a6c3e9365c repo: add issue and pr templates (#84) 2025-09-25 09:30:14 +02:00
wukko 241320ecf8 revision: bump to 12 2025-09-24 20:06:12 +03:00
wukko 53fb10ad9f extras: update onboarding 2025-09-24 20:05:43 +03:00
wukko 35a97e939a merge: update to ungoogled-chromium 140.0.7339.207 2025-09-24 20:03:26 +03:00
jj 63a7f2a8f6 patches/licenses: fix typo'd helium url in credits
wishful thinking i guess
2025-09-24 09:15:32 +00:00
jj ec1d464f81 patches/ublock-sources: enable use_brotli
let's see if this does anything for release size
2025-09-24 09:15:27 +00:00
jj c0be4cb6f6 patches/ublock-sources: fix building on windows
hopefully
2025-09-24 09:15:17 +00:00
jj 643d756f99 patches/hop/setup: drop special handling for recommended extensions
we no longer use/need this since ublock is componentized
2025-09-24 09:15:08 +00:00
Blaise f4bff59760 Update to Chromium 140.0.7339.207 2025-09-23 16:12:47 -05:00
jj 65b83952ab revision: bump to 11 2025-09-23 10:16:39 +00:00
jj f222e11317 patches/l10n: fix building on windows 2025-09-23 10:13:23 +00:00
jj 0fb8ca5007 ci: add extras to download list (#80) 2025-09-22 22:09:32 +00:00
wukko b21cc8eee0 revision: bump to 10 2025-09-23 00:46:59 +03:00
wukko 425b998ad1 helium/core: remove google's omnibox suggestions 2025-09-23 00:46:59 +03:00
wukko d6f09b3963 helium/core: remove one more useless context menu item 2025-09-23 00:46:51 +03:00
jj 7b5e85c9c7 cirrus: download and unpack extras too 2025-09-22 21:09:15 +00:00
jj 44155aff41 downloads: move ublock to extras
mb
2025-09-22 21:02:10 +00:00
wukko 290a999fbc readme: add more info, all related links, and logo 2025-09-22 23:41:01 +03:00
jj ece7f03452 revision: bump to 9 2025-09-22 19:09:11 +00:00
jj f4c4fdfa0e patches: add relevant licenses to credits page 2025-09-22 19:06:59 +00:00
wukko 1160f1b98d revision: bump to 8 2025-09-22 21:49:05 +03:00
wukko ba6dce63e5 ci/bump-platform: update commit name to use new repo name 2025-09-22 21:48:56 +03:00
wukko f4ddea3723 helium/core/update-credits: update helium repo url 2025-09-22 21:43:47 +03:00
wukko 32f0cf8c81 extras: update onboarding 2025-09-22 19:54:54 +03:00
jj 99f65cfbcd patches/ublock: install ublock as component extension
- locked down and reconfigured component behavior
- set up localization of manifest.json
- todo: split up extensions/browser/extension_registrar.cc
  into separate patch and credit brave
- added ui for extension settings to indicate u0 is a helium
  component
- migration and services stuff, almost done
- fix ublock re-enabling on next launch when disabled
- more reliably refresh assets.json on pref change
- add ublock pref to settings
- refresh patches
- part 5: pin by default, update incognito preference
2025-09-22 15:21:13 +00:00
jj b0f30bffcf downloads: implement cross-platform unzips 2025-09-21 17:25:34 +00:00
wukko c8be580734 revision: bump to 7 2025-09-19 11:56:11 +03:00
wukko 34fb66f3cb patches: refresh for 140.0.7339.185 2025-09-19 05:13:00 +06:00
wukko a228d8d3e6 merge: update to ungoogled-chromium 140.0.7339.185 2025-09-19 05:02:54 +06:00
Blaise 4a2db8bd77 Update to Chromium 140.0.7339.185 2025-09-17 14:54:48 -05:00
wukko d5a8399923 extras: update onboarding 2025-09-16 23:14:38 +06:00
wukko 06e5b89b3a helium/ui: improve flags webui
- fixed alignment issues
- made search bar wider and less ugly
- made select dropdowns rounded
- proper outline for :focus-visible
2025-09-15 10:25:48 +06:00
wukko f1204f7694 helium/ui/color-scheme: update colors in flags webui 2025-09-15 10:24:50 +06:00
wukko a0d6aa20e3 helium/core/split-view: overcorrect for rounding errors, clean up
- removed code for insets
- removed side panel's rounded corner which is supposed to match split view's behavior, and we no longer have rounded corners there
2025-09-15 09:54:11 +06:00
wukko 6771b17612 revision: bump to 6 2025-09-15 01:02:21 +06:00
wukko c9845885f6 helium/settings: remove even more safety hub entry points 2025-09-15 00:48:35 +06:00
wukko 16ab1cf6fb helium/ui/color-scheme: fix colors in color picker preview 2025-09-15 00:21:31 +06:00
wukko f8269d2587 helium/ui: helium color scheme in skia ui & webui 2025-09-14 23:38:45 +06:00
wukko 5ec769b511 devutils/set_quilt_vars: don't sort patches
same as #64 but this time for .sh instead of .fish
2025-09-13 16:07:53 +06:00
wukko aaffd20cda revision: bump to 5 2025-09-13 15:52:13 +06:00
wukko 38e39f466b helium/core: force waffle (eu) search settings
this affects the amount of visible search engines. default shows top 5 engines (kTopFive), but EU settings shuffle all available options (kShuffled), which is exactly what we want (and had) before google changed this.

see for reference: https://source.chromium.org/chromium/chromium/src/+/refs/tags/140.0.7339.132:components/regional_capabilities/program_settings.cc
2025-09-13 15:45:05 +06:00
wukko e625432f33 revision: bump to 4 2025-09-12 23:02:59 +06:00
wukko e19261507e downloads: split extras into extras.ini again
reverts f72d8b763b
2025-09-12 23:02:43 +06:00
wukko 92ebfbe654 devutils/set_quilt_vars: don't sort patches
our patches are often sorted in logical order, not alphabetically. even if we were to switch to alphabetically sorted patches now, the diff & blame would be completely incomprehensible, and i think we should avoid that.
2025-09-12 22:30:59 +06:00
wukko e68b57dfe6 revision: bump to 3 2025-09-12 22:05:12 +06:00
wukko 45bb2e7044 helium/core/spellcheck: update toggle description 2025-09-12 22:04:51 +06:00
wukko 1c903792d3 downloads: update onboarding 2025-09-12 21:50:52 +06:00
jj f72d8b763b downloads: drop extras.ini
i dont remember why i made it lol
2025-09-11 17:46:14 +00:00
jj d0c67ff7a3 patches/ublock: enable in incognito by default 2025-09-11 17:46:14 +00:00
wukko 22c8e702bb helium/core: fix eu search feature enforcement 2025-09-11 23:22:13 +06:00
wukko fe05e0c361 patches: refresh for 140.0.7339.132 2025-09-11 20:47:39 +06:00
wukko 2a3b46b1d8 merge: update to ungoogled-chromium 140.0.7339.132 2025-09-11 20:47:39 +06:00
wukko c62576f910 helium/settings/appearance-page: remove one more linux exclusion flag
oh my god bruh
2025-09-11 20:42:42 +06:00
jj 9247351f2a ci/bump-platform: download and unpack platform-specific downloads (#58) 2025-09-11 14:27:15 +00:00
wukko 0caf5fe713 revision: bump to 2 2025-09-11 19:43:49 +06:00
wukko 66e9d195b2 helium/settings/fix-appearance-page: add a missing string to linux build
fixes the settings page crash (oops)
2025-09-11 19:42:31 +06:00
wukko 4acf516bbb helium/split-view: reduce drop target area, increase delay, fix colors 2025-09-11 13:08:33 +06:00
jj 18bc8e75e5 patches/core: disable unsupported importer services 2025-09-10 20:20:19 +00:00
jj 7df2e17c45 patches/core: add zen importer 2025-09-10 19:02:39 +00:00
wukko 6888497c4f readme: add info about linux and windows, remove general wip phrase 2025-09-11 00:10:30 +06:00
wukko a3b5843cea revision: reset to 1 2025-09-10 23:50:26 +06:00
wukko ae906424f7 resources/branding: update app_icon assets
the star is now easier to see from afar
2025-09-10 20:15:32 +06:00
networkException 3cf2a3b65c Update to Chromium 140.0.7339.132 2025-09-10 01:45:26 +02:00
networkException 82e76623df Update to Chromium 140.0.7339.127 2025-09-10 01:37:35 +02:00
wukko 6d832bc549 helium/core: protect browser keyboard shortcuts
websites will no longer take preference over cmd+shift+c and devtools shortcuts
2025-09-09 16:01:17 +06:00
wukko 76a70fa75a extras: update onboarding 2025-09-09 00:21:30 +06:00
wukko 1b024c9945 helium/core: remove dead toolbar actions
removes dead reading list toggle from ui and other things from code that we don't need
2025-09-08 22:28:05 +06:00
wukko 1fc24d56bc helium/ui/status-bubble: move further from edge, fix colors & border 2025-09-08 22:26:50 +06:00
wukko 3500b75e0f helium/ui/tabs: don't show close button on hover if tab is too small 2025-09-08 22:25:21 +06:00
jj 9b37c1dd59 patches/importer: add comet 2025-09-07 07:58:04 +00:00
jj 98bdc8bb87 patches/importer: add dia 2025-09-07 07:58:04 +00:00
jj 58094866a0 patches: refresh 2025-09-07 07:58:04 +00:00
jj d7389c84f0 patches/proxy-extensions: fix loading extension snippets 2025-09-07 07:58:04 +00:00
jj c22923e812 patches/extra: reimport brave importer from upstream
up to date as of 9d7ca1afc5d61bc0c1026eb0a35e964c68e7f42b
2025-09-07 07:58:04 +00:00
wukko 62650c3dba helium/split-view: remove rounded corners & padding, optimize drop area
and enable new features that enhance the split view experience
2025-09-07 03:38:43 +06:00
wukko 7fc97abd15 helium/settings: remove dead imports 2025-09-07 03:37:08 +06:00
wukko bd71d2dc10 helium/ui/omnibox: fix button chip insets 2025-09-07 03:36:52 +06:00
wukko 075a2ad97d patches: refresh for 140.0.7339.80 2025-09-07 01:15:51 +06:00
wukko 0cad541e9e merge: update to ungoogled-chromium 140.0.7339.80 2025-09-07 01:14:29 +06:00
jj 9650ad4adc patches/bangs: allow trailing commas in bangs.json (#51) 2025-09-04 18:56:15 +02:00
Blaise 6128ec6560 Update to Chromium 140.0.7339.80 2025-09-02 17:55:28 -05:00
jj 7b69063b6e ci: add action for bumping platform repos 2025-08-30 18:53:29 +00:00
jj 5480886df1 devutils/set_quilt_vars: fix undefined variable access 2025-08-30 17:48:05 +00:00
jj 15ecb1cf62 patches/utils: always dry run with fuzz=0 2025-08-30 17:48:05 +00:00
jj 919ea2bc82 utils/patches: add --no-fuzz flag for strict application 2025-08-30 17:48:05 +00:00
jj 3406ac5f76 patches/native-messaging: don't append suffix to "guessed" chrome path 2025-08-30 19:35:18 +02:00
wukko 5118e7ddfb revision: bump to 7 2025-08-28 23:52:55 +06:00
wukko 42947bebc1 merge: update to ungoogled-chromium 139.0.7258.154 2025-08-28 18:48:59 +06:00
jj ab2ee8d4e9 ci/release: fix changelog output (#47) 2025-08-27 09:47:40 +02:00
networkException 3799c9d957 Update to Chromium 139.0.7258.154 2025-08-26 23:27:18 +02:00
wukko 5abb6826a1 revision: bump to 6 2025-08-26 00:05:27 +06:00
wukko 1239a6715b helium/ui/omnibox: make "remove suggestion" button square 2025-08-25 23:55:41 +06:00
wukko 6311688cca helium/ui/tabs: make close button square 2025-08-25 23:55:12 +06:00
wukko 74da8e5721 helium/core/context-menu: remove google image desc entry 2025-08-25 23:54:54 +06:00
wukko 6db3e69109 helium/ui/gray-theme: set gray theme on reset, not blue 2025-08-25 23:54:08 +06:00
wukko 2873e42d24 helium/settings: fix appearance page
- updated "auto pin new tab groups" toggle text to not mention other devices
- removed gtk & qt options on linux
2025-08-25 23:53:38 +06:00
wukko dd31b185bd helium/settings: update search suggest toggle text
now it's more informational
2025-08-25 23:52:34 +06:00
jj 617f8df878 ci/release: use softprops action instead of deprecated one 2025-08-25 11:18:27 +00:00
jj 9f92137d3f ci: automatically tag commit and create release 2025-08-25 11:18:27 +00:00
jj dc626238a7 utils/helium_version: add support for generating root-only version 2025-08-25 10:49:05 +00:00
wukko fc9e935120 revision: bump to 5 2025-08-23 23:41:45 +06:00
wukko d0198c25f9 helium/ui: enable fluent scrollbar on windows & linux 2025-08-23 22:23:49 +06:00
jj 92f6d7d2c8 patches/bangs: fix bang completion cutting off suggested text (#41) 2025-08-23 13:47:46 +00:00
jj 988e4b4fb4 patches/bangs: add support for multiple triggers per bang
https://github.com/kagisearch/bangs/pull/259
2025-08-23 06:52:56 +00:00
jj 2ea2284c35 patches/bangs: fix DCHECK fail when triggered on text with leading space 2025-08-23 06:52:56 +00:00
jj e06a3a62f5 patches/native-messaging: fix env call to use current signature 2025-08-22 18:53:19 +00:00
jj b843eac0ce patches/block-requests: prevent profile_resetter from making requests 2025-08-21 13:32:09 +00:00
wukko 46b3fa7099 revision: bump to 4 2025-08-21 19:02:28 +06:00
wukko b249347978 merge: update to ungoogled-chromium 139.0.7258.138 2025-08-21 18:41:50 +06:00
Blaise 803eb8c3f5 Update to Chromium 139.0.7258.138 2025-08-19 16:06:15 -05:00
wukko 9ec3ed6ecd revision: bump to 3 2025-08-16 18:59:46 +06:00
wukko f240e14a58 helium/core: disable outdated build detector
it's not relevant for helium, we don't have background updaters
2025-08-16 18:59:46 +06:00
wukko b497f44124 helium/ui: fix app menu button styling in label state
- fixed padding & size
- background and icon are no longer highlighted with emphasis color in label state
- icon color is no longer blue
- enabled border in label state
- removed chrome-only bloat code for randomizing the update text
2025-08-16 18:59:46 +06:00
wukko 475fd063f3 helium/ui/app-menu: remove row bg, fix separators, refactor
also fixed related padding & colors
2025-08-16 18:59:46 +06:00
wukko 31bdefc2de helium/settings: fix text on cookies page
- replaced google.com with example.com in third party cookies section
- updated "do not track" popup text to not glaze evil tracking practices
- removed "learn more" link from do not track popup
2025-08-16 18:59:38 +06:00
jj 25c7197893 patches: refresh for 139.0.7258.127 2025-08-13 06:58:05 +00:00
jj f4f122c9f6 merge: update to ungoogled-chromium 139.0.7258.127 2025-08-13 06:57:14 +00:00
jj e9785fd0ac Update to Chromium 139.0.7258.127 2025-08-13 06:55:19 +00:00
wukko bcd55afb27 patches/extra: disable ai starter pack shortcuts 2025-08-08 20:24:30 +06:00
wukko df88312959 helium/core: disable google ai starterpack options
disables gemini, aimode, and page shortcuts; even if google didn't gate the features correctly, which happened with aimode
2025-08-08 20:16:15 +06:00
wukko 3826ee65e4 merge: update to chromium 139.0.7258.66 (#34) 2025-08-08 18:22:29 +06:00
wukko b3b03d89a8 helium/core/fix-search-engine-icons: enable builtin assets again
and remove the google logo exception, it's taken care of in a different grd now
2025-08-08 17:38:01 +06:00
wukko d5b941f6a1 extras: add search engines data
google removed all search engine icons & related resources from upstream, so we have to do this now
2025-08-08 17:37:13 +06:00
wukko 11d0256815 extras: update onboarding 2025-08-08 17:15:03 +06:00
wukko 04ecb9e752 helium/core/split-view: fix rounded corners
backported change from upstream, this should fix them on windows too maybe
2025-08-08 11:57:26 +06:00
wukko 9617147a23 patches: refresh for 139.0.7258.66
the issue that helium/ui/toolbar-avatar-button.patch fixed was fixed upstream
2025-08-08 10:42:58 +06:00
wukko 053a134aca merge: update to ungoogled-chromium 139.0.7258.66 2025-08-08 10:42:57 +06:00
jj 80158a7006 utils/generate_resources: make pylint happy 2025-08-07 12:48:52 +00:00
jj 6267361984 utils/generate_resources: allow omitting size in definitions 2025-08-07 12:43:00 +00:00
jj 185e973431 utils/generate_resources: use pathlib for output path 2025-08-07 11:28:14 +00:00
jj b66c25b115 ci: specify permissions for all workflows (#32) 2025-08-07 09:43:40 +02:00
Blaise a078b9be0f Update to Chromium 139.0.7258.66 2025-08-05 13:57:34 -05:00
wukko dfd5a4b8f8 revision: bump to 15 2025-08-04 23:00:24 +06:00
wukko 89ee3b3b14 helium/settings: fix section separators 2025-08-04 16:28:28 +06:00
wukko cfa6338be0 helium/core/eu-search: replace the settings subtitle 2025-08-04 16:28:06 +06:00
wukko fe8ffb61e4 helium/core/flags-setup: put helium flags on top 2025-08-04 16:27:43 +06:00
jj 2da6aa7a41 patches/extra: add ungoogled-chromium license and info to about page 2025-08-03 07:58:37 +00:00
wukko af66427d7a helium/ui: clean incognito & guest ntp
- removed inactive 3rd party cookies toggle
- replaced incognito text with a helium variant
- removed learn more link from guest ntp
2025-08-02 16:32:23 +06:00
jj f67127450a domain-substitution: exclude LICENSE files from substitution 2025-07-31 13:13:19 +00:00
wukko 72be230adb revision: bump to 14 2025-07-31 13:09:07 +06:00
wukko 5973e33db0 helium/core: add a flag for disabling ECH 2025-07-31 12:58:13 +06:00
wukko ce3794932e patches: refresh for 138.0.7204.183 2025-07-31 12:10:12 +06:00
wukko c3c2cfdce5 Update to Chromium 138.0.7204.183 2025-07-30 20:49:41 +06:00
Blaise d591df2fac Update to Chromium 138.0.7204.183 2025-07-29 16:30:30 -05:00
wukko d5328e5468 revision: bump to 13 2025-07-29 15:34:02 +06:00
wukko df3f623ce3 utils: raise an error if a line in resource file is invalid 2025-07-29 15:29:34 +06:00
wukko c85860fa87 utils & resources: generate scaled resources with a script 2025-07-29 15:29:28 +06:00
wukko 5bf0662a2e resources/branding: add various app icons 2025-07-29 13:53:16 +06:00
wukko 9721334c56 resources/branding: remove product_icon dir
it'll be replaced with automatically generated resources
2025-07-29 13:34:05 +06:00
wukko 374735e1ba resouces/branding: update & fix colored skia product logo 2025-07-28 17:54:36 +06:00
wukko 5333dad88e resources/branding: update product_logo.svg with new icon design 2025-07-28 17:54:36 +06:00
wukko f353c28ab7 resources/branding: update product_logo for better legibility 2025-07-28 17:54:35 +06:00
jj 0d9cf8aefa lint/tests: convert prints into asserts 2025-07-28 11:45:32 +00:00
jj 9d9d4479ae devutils/lint: fix pylint errors 2025-07-28 11:45:31 +00:00
jj b2ea2d84bd patches: refresh add-update-channel-flag.patch 2025-07-28 11:45:05 +00:00
wukko ea001f53af patches/helium: add helium license header to files that don't have it 2025-07-28 17:10:30 +06:00
wukko 29b9fd70dd devutils/lint_tests: fix license header check 2025-07-28 16:15:21 +06:00
wukko cd5f460053 patches/helium/core: fix incorrect header guards 2025-07-28 16:02:51 +06:00
wukko 0c784d8e79 devutils: add script for checking patch correctness (#29) 2025-07-28 15:28:27 +06:00
jj a86284a2c8 dev/lint: handle error correctly if defines are completely missing 2025-07-27 22:30:49 +00:00
jj 10132253e9 ci: add linting to ci 2025-07-27 22:25:45 +00:00
jj deeebee817 devutils: add script for checking patch correctness 2025-07-27 22:25:45 +00:00
jj 88d7a03d8d replace_resources: clean up error handling 2025-07-27 20:45:59 +00:00
jj 7b231012ef scripts: fix lint errors
utils: lint

helium_version: fix lint errors

name_substitution: fix lint errors

devutils: lint
2025-07-27 20:52:01 +00:00
jj 8013b3af73 ci: add ensurepip to cirrus 2025-07-27 20:24:53 +00:00
jj d2bb884eee ci: run cirrus tasks 2025-07-27 20:15:02 +00:00
wukko a25b8fdf15 revision: bump to 12 2025-07-24 20:38:09 +06:00
wukko 07314070e0 helium/core/split-view: fix corner radius 2025-07-24 20:32:46 +06:00
wukko b8e154c0a4 merge: update to ungoogled-chromium 138.0.7204.168 2025-07-24 18:45:59 +06:00
jj edd517e75f extras: update onboarding 2025-07-24 12:04:50 +00:00
jj dc4a8b6686 patches/scan-chrome-native-messaging-hosts: fix windows constant type 2025-07-23 21:26:08 +00:00
Blaise 5fd0da8902 Update to Chromium 138.0.7204.168 2025-07-23 15:43:49 -05:00
jj 2fe35f1cbc extras: update onboarding 2025-07-23 14:37:25 +00:00
jj c0e49a6e5f patches/disable-gcm: disable additional gcm client methods 2025-07-18 16:49:32 +00:00
wukko a68148b1b3 revision: bump to 11 2025-07-18 14:43:27 +06:00
wukko d7a24f79d3 patches: refresh for 138.0.7204.157 2025-07-18 14:27:57 +06:00
wukko ba4fee2f1c merge: update to ungoogled-chromium 138.0.7204.157 2025-07-18 13:01:57 +06:00
Derron Hu ada3db3214 Add -snld flag to 7z (#3387) 2025-07-17 17:29:20 -05:00
wukko 1fe2601442 revision: bump revision to 10 2025-07-18 00:14:52 +06:00
wukko 69ec6832db helium/settings/privacy-page: update descriptions, clean up sections
- updated descriptions of security & site settings pages to reflect what they actually contain
- removed the "third party cookies" section, it's accessible via site settings. 3rd party cookies are blocked by default
2025-07-18 00:00:22 +06:00
wukko b7e051ff66 helium/ui/omnibox: fix IPH_SUGGESTION height & icon alignment 2025-07-17 22:21:09 +06:00
wukko 5e6679af3b extras: update onboarding 2025-07-17 22:02:16 +06:00
wukko 127c193c16 helium/core: refresh a patch that wasn't refreshed during string update 2025-07-17 21:29:24 +06:00
wukko 1430f2f69b helium/ui: fix status bubble padding & refactor
no more extra padding on right
2025-07-17 21:27:36 +06:00
wukko 593fd56dd9 helium/ui: remove third party cookies icon from location bar
also removed other unused icons

third party cookies are blocked in helium by default, so showing an icon for that every time it happens is unnecessary. the user can enable third party cookies in site settings -> cookies without leaving the page.
2025-07-17 21:26:39 +06:00
wukko 10a9c6387a helium/core: update helium pref toggle titles and descriptions 2025-07-17 20:46:17 +06:00
wukko f1b511b12c revision: bump to 9 2025-07-16 22:55:17 +06:00
wukko 5cd4d9e585 helium/ui: rename a bunch of patches for better clarity 2025-07-16 16:52:37 +06:00
wukko dfd4885224 helium/ui: update omnibox ui & align everything related 2025-07-16 16:37:31 +06:00
wukko 84e0fdbde7 helium/ui: make status bubble floating all the time
no more weird uneven window edges

(not sure if this works on windows & linux ngl)
2025-07-16 16:36:09 +06:00
wukko 6e6809a053 helium/ui: remove tab group drag highlight
(again)
2025-07-16 16:35:25 +06:00
networkException 4473e83be8 Update to Chromium 138.0.7204.157 2025-07-15 21:09:55 +02:00
wukko 8c7b2012a9 revision: bump to 8 2025-07-13 23:27:58 +06:00
wukko fe261284a0 helium/ui/layout-constants: fix avatar chip insets 2025-07-13 23:09:07 +06:00
wukko 4439e6c91b helium/ui: fix avatar button bg colors in toolbar
normal state no longer has a background and guest state is way more bearable now
2025-07-13 23:08:38 +06:00
wukko 6e8168f3bc helium/ui: remove broken side panel separator
but keep the rounded corner :3
2025-07-13 21:03:19 +06:00
wukko 3f97be7852 helium/ui: reduce split view padding & align everything 2025-07-13 21:02:35 +06:00
wukko 8136fa3543 helium/ui: revamped top container ui 2025-07-13 19:46:44 +06:00
wukko e379f406e5 revision: bump to 7 2025-07-11 23:21:53 +06:00
wukko 7a02f2ac4b helium/settings: fix expression in translate patch 2025-07-11 22:09:38 +06:00
wukko 3a8dcfc49f helium/ui: new tab design
- tabs are now narrower and shorter
- split view tabs are wider to accommodate for two tabs in one component
- tabs are now attached to the toolbar
- close button now appears only on hover/focus
- fixed tab closing animation, close button no longer slides along with the rest of the tab
- new tab button no longer interferes with the tab separator
2025-07-11 21:59:26 +06:00
wukko 2f1884b2e5 helium/ui: transparent address bar and thinner toolbar 2025-07-11 21:42:18 +06:00
wukko 49e177c717 revision: bump to 6 2025-07-11 01:52:51 +06:00
wukko 21f7d239c9 patches: refresh for 138.0.7204.100 2025-07-11 00:43:27 +06:00
wukko 56d91da258 merge: update to ungoogled-chromium 138.0.7204.100 2025-07-10 22:20:03 +06:00
Blaise d945d574c6 Update CI config, scripts, and docs for python 3.10 2025-07-10 06:49:41 -05:00
jj d06b7de006 helium: add flag for setting energy saver fps 2025-07-09 22:19:31 +00:00
Blaise cff0ad9d51 Update to Chromium 138.0.7204.100 2025-07-08 13:57:01 -05:00
jj c27928ab4a revision: bump to 5 2025-07-06 19:18:32 +00:00
jj 3fa437ef53 helium/updater-prefs: change macos appcast url
this is easier to proxy
2025-07-05 15:39:10 +00:00
wukko 13d630288f revision: bump to 4 2025-07-05 16:25:00 +06:00
wukko d2021bb3ef helium/settings/about-page: remove learn more links 2025-07-04 23:00:01 +06:00
wukko a5b8806ff9 revision: bump to 3 2025-07-04 19:11:16 +06:00
wukko 62467f9b12 patches: refresh for 138.0.7204.96 2025-07-04 18:59:16 +06:00
wukko e8355e7d7c merge: update to ungoogled-chromium 138.0.7204.96 2025-07-04 18:29:15 +06:00
jj 15c3d58053 revision: bump to 2 2025-07-04 11:15:25 +00:00
jj e2f0519286 helium/settings: reenable update progress ui 2025-07-02 21:05:23 +00:00
jj 566f20b5ed helium: add preference to control fetching updates
configurable on mac only for now
2025-07-02 21:05:06 +00:00
jj 2fa5711cea helium: add update channel flag 2025-07-02 21:05:05 +00:00
jj c653aeb93b patches/versioning: include full version in CFBundleVersion 2025-07-02 21:04:47 +00:00
wukko eb50fd7139 settings: remove safety hub entry points
cuz they don't work
2025-07-02 19:48:24 +06:00
wukko be70b704a2 settings: remove translate section 2025-07-02 19:34:46 +06:00
wukko 8f98e3eac5 helium/core: fix tab sync unreached error
TabGroupSyncServiceProxy::OnTabSelected() is not implemented upstream
2025-07-02 18:48:07 +06:00
wukko 457da2ea74 helium/core/add-native-bangs: use VLOG() instead of LOG() 2025-07-02 18:45:37 +06:00
wukko c471f52d54 helium/core/split-view: remove mini toolbar 2025-07-02 18:45:10 +06:00
wukko 8d01b7d62f helium/core: don't disable tab groups in bookmark bar
cuz it results in an empty bookmark bar if you make a tab group and then close it without removing it
2025-07-02 18:44:38 +06:00
wukko 51aaf38e8d helium/core: remove google spellcheck from context menu 2025-07-02 18:44:00 +06:00
networkException d35f39cd85 Update to Chromium 138.0.7204.96 2025-06-30 23:33:03 +02:00
implicitfield e5f27a9138 Add a flag to increase the storage quota for Incognito/Guest profiles 2025-06-27 13:10:44 -05:00
implicitfield f7e6d2273d Remove the F1 shortcut 2025-06-27 13:10:44 -05:00
jj 8900b76f0b patches: refresh for 138.0.7204.49 2025-06-27 18:05:22 +00:00
Qian Qian "Qubik"‎ 15ee44b5a9 docs: Update Homebrew Cask Name
Signed-off-by: Qian Qian "Qubik"‎ <qubik65536@qubik65536.top>
2025-06-27 10:09:11 -04:00
jj 37da72130f update_lists: remove generate_search_engine_icons from sub list
gone upstream
2025-06-26 19:33:31 +00:00
jj 4d6fdeb156 merge: update to ungoogled-chromium 138.0.7204.49 2025-06-26 19:33:10 +00:00
Damir Modyarov 28823a634b utils/name_substitution: use utf-8 encoding when opening locale files 2025-06-25 00:14:23 +03:00
Blaise dad7e19df0 Update to Chromium 138.0.7204.49 2025-06-24 15:00:12 -05:00
Blaise 9a900f1e48 Update to Chromium 137.0.7151.119 2025-06-17 15:59:17 -05:00
wukko 672c986f28 repo: update README and remove unrelated upstream docs 2025-06-13 15:26:41 +06:00
wukko 6305ef215f revision: bump to 5 2025-06-13 11:14:46 +06:00
wukko 58f6aa1135 patches: refresh for 137.0.7151.104 2025-06-13 11:14:28 +06:00
networkException 483d84e481 LICENSE: Bump the year to 2025 for a complete decade
Happy Birthday ungoogled-chromium!

See 9456dad229 for the initial
commit, 10 years ago today :^)
2025-06-12 18:42:06 +02:00
wukko dbe7963624 merge: update to chromium 137.0.7151.104 2025-06-12 22:13:52 +06:00
Blaise 47bc6ecca7 Update to Chromium 137.0.7151.103 2025-06-10 16:19:42 -05:00
wukko ebb0cb88e4 revision: bump to 4 2025-06-05 23:17:54 +06:00
wukko 71cd486eaf patches/series: add split view patch
forgot to stage this
2025-06-05 18:55:21 +06:00
wukko bf26fa3e96 helium/core/split-view: fix spacing, backport code, enable by default
& also fix text color in empty state
2025-06-05 18:52:50 +06:00
wukko e1f2182e90 helium/core: remove "read later" from tab's context menu 2025-06-05 18:50:41 +06:00
wukko 058dbdb229 revision: bump to 3 2025-06-05 01:43:38 +06:00
wukko c9a7f5b1b3 helium/ui/tab-style: fix margin between tabs 2025-06-05 00:46:54 +06:00
wukko 1d5f225b08 helium/core: clean up context menu
- remove qr code generation action
- remove cast option from main page context menu
- merged "remove read anything context menu entry" into this patch
2025-06-04 23:38:59 +06:00
wukko d9213991cc helium/ui: fix pwa toolbar
- it's now not as tall
- action buttons don't have 1km spacing between them
2025-06-04 22:58:21 +06:00
wukko a6484f3d3f helium/ui: smaller window grab handle 2025-06-04 22:05:04 +06:00
wukko 6271d50506 helium/ui/layout-constants: adjust toolbar-related spacings 2025-06-04 22:03:57 +06:00
jj 6e13b31f0e chromium: update to 137.0.7151.69 2025-06-03 16:04:44 +00:00
networkException dbb383d84e Update to Chromium 137.0.7151.68 2025-06-03 01:47:13 +02:00
wukko 025564d6d7 helium/core/proxy-extensions: fix deps order in build.gn 2025-05-31 18:21:35 +06:00
jj 4010387eab repo: add ungoogled-chromium license to root 2025-05-31 11:51:48 +00:00
wukko 3a977845f0 patches/series: remove holes 2025-05-31 17:30:47 +06:00
wukko a126f65782 patches: refresh for 137.0.7151.55 2025-05-31 17:04:02 +06:00
wukko 28393b6386 merge: update to ungoogled-chromium 137.0.7151.55 2025-05-31 16:39:59 +06:00
Blaise 76f98dc4eb Update to Chromium 137.0.7151.55 2025-05-27 14:46:55 -05:00
Max Lee Abdurrahman As-Salafi Carter 祁明思 70eb9a635d fix: correct f-string quote usage in helium_version.py (#18) 2025-05-26 16:59:30 +02:00
jj 7413c75494 helium/bangs: verify keyword is matching before stripping 2025-05-23 09:17:31 +00:00
wukko b5f74116b5 revision: bump to 10
god damn
2025-05-22 01:08:13 +06:00
wukko 825f4133fb utils/replace_resources: print the destination after copying 2025-05-22 00:45:56 +06:00
wukko aa47b1c96b helium/ui: fix omnibox tabs icon
now it's a tab icon instead of brand icon
2025-05-22 00:44:37 +06:00
wukko 89b1d39616 helium/ui/app-menu: add customize action to main, fix bookmarks title
& also rename patch to be universal
2025-05-22 00:43:33 +06:00
wukko 0796d78ce2 helium/core: don't try to toggle the extension container that isnt there
fixes a crash in guest mode (because the container isn't created in guest mode)
2025-05-21 23:29:37 +06:00
wukko 0e489582aa helium/core: toggle extensions container in toolbar via a pref 2025-05-21 22:22:06 +06:00
wukko bb49e1680e helium/core: hide avatar in toolbar via a pref
& make it a toggle in customization side panel
2025-05-21 19:39:02 +06:00
wukko c242d6f7f6 helium/ui: make infobar & text button thinner 2025-05-21 16:56:00 +06:00
wukko 6f9cf25b95 helium/core: move tab search to toolbar & disable by default 2025-05-21 16:55:18 +06:00
jj 52271f9841 bump revision 2025-05-20 21:38:44 +00:00
jj 9873ccd1d9 helium/onboarding: don't open if --no-first-run is set, bump version 2025-05-20 21:38:07 +00:00
wukko 364ce99eaf revision: bump to 8 2025-05-18 18:44:42 +06:00
wukko aef6a463d5 extras: update onboarding 2025-05-18 18:44:29 +06:00
wukko 5fee4a7145 resources/branding: replace more skia product icons 2025-05-18 18:09:00 +06:00
wukko 55efa2111f resources: move helium skia icons to resources 2025-05-18 18:07:57 +06:00
wukko 49373d155b resources/branding: optimize product logo svg 2025-05-18 17:56:39 +06:00
wukko bb5af0c7b1 helium/ui/app-menu: remove obnoxious bg from default browser prompt 2025-05-18 17:56:24 +06:00
wukko af5539abf7 helium/ui/settings: clean up product info footer on about page
& merge other tiny patch into this one cuz it just makes sense
2025-05-18 17:14:50 +06:00
wukko a3db74b428 helium/ui/cr-components: fix segmented button border & size
now it doesn't stick out of its bounds, making it align perfectly with all other items in the "customize chrome" side panel
2025-05-18 16:34:20 +06:00
wukko 14d7bbb71b helium/ui/layout-provider: make side panel content radius 12dp 2025-05-18 12:02:15 +06:00
wukko 5607b15249 helium/ui/sidepanels: fix card widths, paddings, and radius
also made the search bar in bookmarks bar of appropriate radius
2025-05-18 12:01:52 +06:00
wukko 64ec07beb7 helium/ui/sidepanels: fix button order, header padding, and update icons 2025-05-18 11:33:52 +06:00
wukko 38a114d48d helium/ui/cr-components: fix focus ring on custom theme color picker 2025-05-18 11:31:57 +06:00
wukko 08f481a314 helium/ui/cr-components: fix segmented button option radius 2025-05-18 08:53:07 +06:00
jj cde40a97f0 helium/ui/bangs: add appropriate text and icons for ai chatbots 2025-05-17 21:59:42 +00:00
jj 0dae50b2f0 helium/bangs: add support for categories 2025-05-17 21:59:42 +00:00
wukko 327c2eccfc revision: bump to 7 2025-05-17 19:44:37 +06:00
jj a256e3a4e5 helium/bangs: support omnipositional bangs (#16) 2025-05-17 19:42:51 +06:00
wukko f753602e4e helium/ui: fix sidepanel headers 2025-05-17 19:19:46 +06:00
wukko f45035b8c9 helium/ui/cr-components: thinner segmented button 2025-05-17 18:04:45 +06:00
wukko 7310a65592 helium/ui: restyle the "customize chrome" sidepanel 2025-05-17 18:04:25 +06:00
wukko 03b64f23a4 helium/omnibox: make omnibox rows thinner, fix alignment
& also make omnibox_suggestion_button_row_view prettier
2025-05-17 14:51:24 +06:00
wukko 29cf8f0ad3 helium/ui: re-align location bar keyword search 2025-05-17 14:50:49 +06:00
wukko bf61a1a5c0 helium/ui: make toolbar & tab strip thinner 2025-05-17 14:50:23 +06:00
wukko 60f45b2ba5 helium/ui: clean up profile customization dialog
it's seen when you make a new profile
2025-05-17 11:57:23 +06:00
wukko 159473844a helium/copy-page-url-shortcut: fix copy url accelerator
alt -> shift
(oops)
2025-05-17 10:58:08 +06:00
wukko 1e4188bbca merge: update to ungoogled-chromium 136.0.7103.113 2025-05-15 20:23:34 +06:00
networkException 1a4952eb9e Update to Chromium 136.0.7103.113 2025-05-14 20:06:15 +02:00
wukko 2ce4603ecf revision: bump to 5
gawd damn
2025-05-12 22:21:07 +06:00
wukko 6cce6332c7 extras: update onboarding 2025-05-12 22:20:56 +06:00
wukko 8f89dcfa97 revision: bump to 4 2025-05-12 18:32:00 +06:00
wukko 830b7bcc4b helium/ui: disable tab group editor footer 2025-05-12 17:31:37 +06:00
wukko 06da4cfcdc helium/ui: clean up the profile picker
- removed google bg elements
- fixed bottom button alignment
- removed the chrome logo spin easter egg
2025-05-12 17:04:49 +06:00
wukko f34f4e8bd2 helium/settings: remove about page easter egg
no more spinny helium logo
2025-05-12 17:04:11 +06:00
wukko 27d17fa340 resources/branding: add product_logo.svg 2025-05-12 16:51:27 +06:00
wukko fc37b27f9a utils/name_substitution: don't add to tarball if it doesn't exist 2025-05-12 10:25:21 +06:00
jj a290073661 util: rewrite name substitution script in python 2025-05-11 22:03:52 +00:00
wukko 0814b98d6b revision: bump to 3 2025-05-12 00:10:44 +06:00
wukko b6eaed2233 helium/ui: reduce bookmarks bar padding 2025-05-12 00:07:59 +06:00
wukko d13d58652f helium/ui: remove devtools annoyances
- remove feedback button from recorder panel
- remove what's new panel entirely because it's useless & invasive (auto opened by default)
- remove empty help submenu
2025-05-11 22:44:34 +06:00
wukko fde4fe86b6 helium/ui: remove the autofill link from updated profiles menu 2025-05-11 22:43:16 +06:00
428 changed files with 39066 additions and 11362 deletions
+8 -5
View File
@@ -9,9 +9,9 @@ container:
code_check_task:
pip_cache:
folder: /usr/local/lib/python3.9/site-packages
folder: /usr/local/lib/python3.10/site-packages
fingerprint_script: cat .cirrus_requirements.txt
populate_script: pip install -r .cirrus_requirements.txt
populate_script: python3 -m ensurepip && pip install -r .cirrus_requirements.txt
utils_script:
- python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd utils
- ./devutils/run_utils_pylint.py --hide-fixme
@@ -26,9 +26,9 @@ validate_config_task:
validate_with_source_task:
pip_cache:
folder: /usr/local/lib/python3.9/site-packages
folder: /usr/local/lib/python3.10/site-packages
fingerprint_script: cat .cirrus_requirements.txt
populate_script: pip install -r .cirrus_requirements.txt
populate_script: python3 -m ensurepip && pip install -r .cirrus_requirements.txt
chromium_download_script: |
# These directories will not exist when this is called, unless cache retrieval
# fails and leaves partially-complete files around.
@@ -36,6 +36,7 @@ validate_with_source_task:
rm -rf chromium_download_cache
mkdir chromium_download_cache
# Attempt to download tarball
./utils/downloads.py retrieve -i deps.ini -c chromium_download_cache &
if ! ./utils/downloads.py retrieve -i downloads.ini -c chromium_download_cache ; then
# If tarball is not available, attempt a clone
./utils/clone.py -o chromium_src
@@ -44,10 +45,12 @@ validate_with_source_task:
tar cf chromium_download_cache/chromium-$(cat chromium_version.txt)-lite.tar.xz \
--transform s/chromium_src/chromium-$(cat chromium_version.txt)/ chromium_src
fi
wait
unpack_source_script: |
if [ ! -d chromium_src ]; then
./utils/downloads.py unpack -i downloads.ini -c chromium_download_cache chromium_src
./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:
+1 -1
View File
@@ -1,5 +1,5 @@
# Dockerfile for Python 3 with xz-utils (for tar.xz unpacking)
FROM python:3.9-slim-bullseye
FROM python:3.10-slim-bookworm
RUN apt update && apt install -y xz-utils patch axel curl git
+10 -9
View File
@@ -1,9 +1,10 @@
# Based on Python package versions in Debian bullseye
# https://packages.debian.org/bullseye/python/
astroid==2.5.1 # via pylint
pylint==2.7.2
pytest-cov==2.10.1
pytest==6.0.2
httplib2==0.18.1
requests==2.25.1
yapf==0.30.0
# Based on Python package versions in Debian bookworm
# https://packages.debian.org/bookworm/python/
astroid==2.14.2 # via pylint
pylint==2.16.2
pytest-cov==4.0.0
pytest==7.2.1
httplib2==0.20.4
requests==2.28.1
pillow==11.3.0
yapf==0.32.0
+1
View File
@@ -0,0 +1 @@
*.patch linguist-language=C++
@@ -0,0 +1 @@
https://helium.computer/funding.json
+77
View File
@@ -0,0 +1,77 @@
name: Bug Report
description: Report a bug building or running Helium
labels: ["bug"]
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Before submitting this bug report, please search existing issues and make sure it's unique.
If you ignore this text, and create this one, you will be permanently banned from
interacting with the entire organization.
If you suspect your bug might be specific to a certain platform (e.g. macOS),
please submit it to the relevant repository instead of the root "helium" repo.
- type: dropdown
id: os
attributes:
label: Operating system
description: The OS you are running Helium on
options:
- macOS
- Linux
- Windows
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Can be copied from helium://settings/help
validations:
required: true
- type: checkboxes
attributes:
label: Have you tested that this is not an upstream issue or an issue with your configuration?
options:
- label: I have tried reproducing this issue in Chrome and it could not be reproduced there
- label: I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there
- label: I have tried reproducing this issue in Helium with a new and empty profile using `--user-data-dir` command line argument and it could not be reproduced there
- type: input
id: description
attributes:
label: Description
description: A clear and concise description (in one line) of what the bug is.
validations:
required: true
- type: textarea
id: repro
attributes:
label: How to Reproduce?
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
description: A clear and concise description of what actually happened
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the problem here. If applicable, add screenshots to help explain your problem.
-101
View File
@@ -1,101 +0,0 @@
name: Bug Report
description: Report a bug building or running ungoogled-chromium
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Before submitting this issue, please confirm if you should submit it to a [platform-specific issue tracker instead](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md#platform-specific-support)
Otherwise, your issue may not be noticed. In addition, please read through the [SUPPORT.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md) first
- type: dropdown
id: os
attributes:
label: OS/Platform
description: OS/Platform you are running ungoogled-chromium on
options:
- Android
- Arch Linux
- Debian, Ubuntu, and derivatives
- Fedora and CentOS
- Gentoo
- GNU Guix
- macOS
- NixOS
- Other Linux (please specify)
- Portable Linux
- Slackware
- Windows
validations:
required: true
- type: dropdown
id: install
attributes:
label: Installed
description: How was ungoogled-chromium installed on your OS/Platform
options:
- Compiled from source
- OS/Platform's package manager
- Flatpak
- https://ungoogled-software.github.io/ungoogled-chromium-binaries/
- Other (please use 'Additional context' field below to mention how exactly)
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: ungoogled-chromium version. Could be copied from chrome://settings/help
validations:
required: true
- type: checkboxes
attributes:
label: Have you tested that this is not an upstream issue or an issue with your configuration?
options:
- label: I have tried reproducing this issue in Chrome and it could not be reproduced there
- label: I have tried reproducing this issue in vanilla Chromium and it could not be reproduced there
- label: I have tried reproducing this issue in ungoogled-chromium with a new and empty profile using `--user-data-dir` command line argument and it could not be reproduced there
- type: input
id: description
attributes:
label: Description
description: A clear and concise description (in one line) of what the bug is
validations:
required: true
- type: textarea
id: repro
attributes:
label: How to Reproduce?
description: Steps to reproduce the behaviour
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behaviour
description: A clear and concise description of what happens
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: A clear and concise description of what you expected to happen
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: sh
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the problem here. If applicable, add screenshots to help explain your problem.
+1
View File
@@ -0,0 +1 @@
blank_issues_enabled: false
@@ -1,18 +0,0 @@
---
name: Create an "Updating to Chromium x.x.x.x"
about: For letting the community track progress to a new stable Chromium
title: Updating to Chromium {{ env.VERSION }} on {{ env.PLATFORM }}
labels: update
assignees: ''
---
Chromium stable channel for {{ env.PLATFORM }} has been updated to a newer version: {{ env.VERSION }}.
If you are willing to work on updating the patches and lists, please leave a comment in this issue in order to facilitate better coordination and avoid wasted/duplicated efforts.
If you'd like to increase visibility of your progress or get early feedback/advice, consider creating a [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). Finally, make sure to reference this issue in your PR. Please make sure to read [/docs/developing.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/docs/developing.md#updating-patches) for guidance.
Feel free to raise issues or questions throughout the process here. However, please refrain from asking for ETAs unless no visible progress has been made here or in the developer's PR for a while (e.g. 2 weeks).
{{ env.NOTIFY_MAINTAINERS }}
@@ -1,13 +1,20 @@
name: Feature request
description: Suggest an idea
labels: ["enhancement", "help wanted"]
labels: ["feat", "pending"]
title: "[FR]: "
body:
- type: markdown
attributes:
value: |
Before submitting this feature request, please confirm if you should submit it to a [platform-specific issue tracker instead](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md#platform-specific-support)
Before submitting this request, please search existing issues and make sure it's unique.
If you ignore this text, and create this one, you will be permanently banned from
interacting with the entire organization.
Otherwise, your issue may not be noticed. In addition, please read through the [SUPPORT.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md) first
Please do not use AI for writing your request's description, no one wishes
to read that and thus your request will be closed.
If your request is for a platform-specific feature (e.g. for macOS), please
submit it to the relevant platform repo instead of the generic "helium" repo.
- type: input
id: description
attributes:
@@ -32,14 +39,9 @@ body:
id: sol
attributes:
label: Possible solutions
description: Please describe possible solution(-s) to The Problem
description: Please describe possible solution(-s) to your problem
validations:
required: true
- type: textarea
id: alt
attributes:
label: Alternatives
description: Please describe alternatives you've considered, if any
- type: textarea
id: additional
attributes:
+17
View File
@@ -0,0 +1,17 @@
---
name: Blank issue
about: Create a new issue from scratch
---
For your issue to not get closed without review, please confirm that:
- [ ] This issue does not fit into any of the predefined categories, which is
why I am making a blank issue from scratch.
- [ ] I am not reporting a security vulnerability through this issue, because
I am aware that there is an appropriate channel for that.
- [x] I understand that I will be permanently banned from interacting with this
organization if I lied by checking any of these checkboxes.
---
[your issue text goes here]
+18 -1
View File
@@ -1 +1,18 @@
*(Please ensure you have read SUPPORT.md and docs/contributing.md before submitting the Pull Request)*
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
(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.
- [x] I understand that I will be permanently banned from interacting with this
organization if I lied by checking any of these checkboxes.
Tested on (check one or more):
- [ ] Windows
- [ ] macOS
- [ ] Linux
---
[short description of your PR goes here]
+109
View File
@@ -0,0 +1,109 @@
name: Bump platform revision
description: Refreshes patches, updates the platform revision and submodule
inputs:
token:
description: 'GitHub access token'
required: true
runs:
using: composite
steps:
- name: Prepare
shell: bash
run: sudo apt install quilt
- name: Clear disk space
shell: bash
run: |
sudo rm -rf /usr/lib/jvm \
/usr/lib/google-cloud-sdk \
/usr/lib/dotnet \
/usr/share/swift
- name: Bump revision and make PR
shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
run: |
set -euxo pipefail
PLATFORM_DIR="$PWD"
HELIUM_DIR="$PLATFORM_DIR/helium-chromium"
run_upstream() {
python3 "$HELIUM_DIR/$1" "${@:2}"
}
get_version() {
run_upstream utils/helium_version.py \
--tree "$HELIUM_DIR" \
--platform-tree "$PLATFORM_DIR" \
--print
}
# get versions and compare them after submodule update
version_before=$(get_version)
export version_before
pushd "$HELIUM_DIR"
git fetch origin main
git checkout origin/main
popd
git switch update || git switch -c update
version_after=$(get_version)
# reset or bump revision counter depending on version change
if [ "$version_before" != "$version_after" ]; then
echo "main version changed, resetting platform revision"
echo 1 > "$PLATFORM_DIR/revision.txt"
else
echo "no change in main version, bumping platform revision"
revision=$(cat "$PLATFORM_DIR/revision.txt")
echo $((revision + 1)) > "$PLATFORM_DIR/revision.txt"
fi
version_after=$(get_version)
export version_after
mkdir -p build/{src,download_cache}
for file in "$HELIUM_DIR/downloads.ini" "$HELIUM_DIR/deps.ini" "$PLATFORM_DIR/downloads.ini"; do
if ! [ -f "$file" ]; then continue; fi
run_upstream utils/downloads.py retrieve \
-i "$file" -c build/download_cache
run_upstream utils/downloads.py unpack \
-i "$file" -c build/download_cache build/src
done
run_upstream utils/patches.py apply \
--no-fuzz build/src "$HELIUM_DIR/patches"
# refresh platform patches if necessary
source "$HELIUM_DIR/devutils/set_quilt_vars.sh"
export QUILT_PATCHES="$PLATFORM_DIR/patches"
pushd build/src
quilt --quiltrc - push -a --refresh
popd
# commit, push, make pr
TITLE="update: helium $version_after"
git config user.name "helium-bot"
git config user.email "helium-bot@imput.net"
git add -u patches helium-chromium revision.txt
PLATFORM_HOOK="$PLATFORM_DIR/.github/bump-hook.sh"
if [ -f "$PLATFORM_HOOK" ]; then
"$PLATFORM_HOOK";
fi
if ! git status | tail -1 | grep -q 'nothing to commit'; then
git commit -m "$TITLE"
git push origin update
gh pr create --title "$TITLE" --body "" || :
fi
+13
View File
@@ -0,0 +1,13 @@
name: cirrus
on: [push, pull_request]
permissions:
contents: read
jobs:
cirrus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cirruslabs/cirrus-action@ac5191d18a9bff05ff1a38f280f2b6d768e32153
+16
View File
@@ -0,0 +1,16 @@
name: Check patch series correctness
on: [push, pull_request]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: python3 ./devutils/lint.py
-97
View File
@@ -1,97 +0,0 @@
name: New version check
on:
# enabling manual trigger
workflow_dispatch:
# running every hour
schedule:
- cron: '48 * * * *'
jobs:
check:
# do not run in forks
if: github.repository == 'ungoogled-software/ungoogled-chromium'
runs-on: ubuntu-latest
steps:
- name: Set maintainer groups
id: maintainers
run: |
echo "all=@networkException" >> $GITHUB_OUTPUT
echo "linux=@rany2 @clickot @emilylange" >> $GITHUB_OUTPUT
echo "windows=" >> $GITHUB_OUTPUT
echo "macos=" >> $GITHUB_OUTPUT
- name: Get the latest Chromium version
id: latest-version
run: |
set -eo pipefail
BASE_URL="https://versionhistory.googleapis.com/v1/chrome/platforms"
END_URL="channels/stable/versions/all/releases?filter=endtime%3Dnone%2Cfraction%3E%3D0.5&order_by=version%20desc"
JQ_FILTER='if .releases | select(type=="array") | length > 0 then .releases | first | .version else "null" end'
for platform in linux win mac; do
printf %s "${platform}_version=" >> $GITHUB_OUTPUT
curl -sf "${BASE_URL}/${platform}/${END_URL}" | jq -re "${JQ_FILTER}" >> $GITHUB_OUTPUT
done
- uses: actions/checkout@v3
- name: Create Issue for all platforms
if: |
contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) &&
contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version) &&
!contains(steps.latest-version.outputs.linux_version, 'null')
uses: dblock/create-a-github-issue@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.latest-version.outputs.linux_version }}
PLATFORM: all platforms
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.linux }} ${{ steps.maintainers.outputs.windows }} ${{ steps.maintainers.outputs.macos }}"
with:
update_existing: false
search_existing: all
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
- name: Create Issue for Linux
if: |
(
!contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) ||
!contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version)
) && !contains(steps.latest-version.outputs.linux_version, 'null')
uses: dblock/create-a-github-issue@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.latest-version.outputs.linux_version }}
PLATFORM: Linux
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.linux }}"
with:
update_existing: false
search_existing: all
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
- name: Create Issue for macOS
if: |
(
!contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) ||
!contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version)
) && !contains(steps.latest-version.outputs.mac_version, 'null')
uses: dblock/create-a-github-issue@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.latest-version.outputs.mac_version }}
PLATFORM: macOS
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.macos }}"
with:
update_existing: false
search_existing: all
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
- name: Create Issue for Windows
if: |
(
!contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) ||
!contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version)
) && !contains(steps.latest-version.outputs.win_version, 'null')
uses: dblock/create-a-github-issue@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.latest-version.outputs.win_version }}
PLATFORM: Windows
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.windows }}"
with:
update_existing: false
search_existing: all
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
+52
View File
@@ -0,0 +1,52 @@
name: Create new release on version bump
permissions:
contents: write
on:
push: { branches: ["main"] }
jobs:
check-release:
name: Create release if it makes sense
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Check if a new release is needed
id: info
env:
COMMIT_BEFORE: ${{ github.event.before }}
COMMIT_AFTER: ${{ github.event.after }}
shell: bash
run: |
mkdir -p dummy && echo 0 > dummy/revision.txt
cp utils/helium_version.py .
git checkout "$COMMIT_BEFORE" \
&& OLD_VERSION=$(python3 helium_version.py --tree . --print)
git checkout "$COMMIT_AFTER" \
&& NEW_VERSION=$(python3 helium_version.py --tree . --print)
if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
{
printf '### Changelog\n```\n'
git log --oneline "$OLD_VERSION.."
echo '```'
} | tee body.md
fi
- name: Create Release
if: steps.info.outputs.version
id: create_release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.info.outputs.version }}
name: ${{ steps.info.outputs.version }}
body_path: body.md
-22
View File
@@ -1,22 +0,0 @@
name: Create new empty release
on:
push:
tags:
- '*'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
+3
View File
@@ -11,3 +11,6 @@ __pycache__/
# Ignore optional build / cache directory
/build
# Ignore generated resources
/resources/generated
-1
View File
@@ -1 +0,0 @@
* @ungoogled-software/core
+29
View File
@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2015-2026, The ungoogled-chromium Authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+57 -171
View File
@@ -1,189 +1,75 @@
# ungoogled-chromium
*A lightweight approach to removing Google web service dependency*
**Help is welcome!** See the [docs/contributing.md](docs/contributing.md) document for more information.
## Objectives
In descending order of significance (i.e. most important objective first):
1. **ungoogled-chromium is Google Chromium, sans dependency on Google web services**.
2. **ungoogled-chromium retains the default Chromium experience as closely as possible**. Unlike other Chromium forks that have their own visions of a web browser, ungoogled-chromium is essentially a drop-in replacement for Chromium.
3. **ungoogled-chromium features tweaks to enhance privacy, control, and transparency**. However, almost all of these features must be manually activated or enabled. For more details, see [Feature Overview](#feature-overview).
In scenarios where the objectives conflict, the objective of higher significance should take precedence.
## Content Overview
* [Objectives](#objectives)
* [Motivation and Philosophy](#motivation-and-philosophy)
* [Feature Overview](#feature-overview)
* [**Downloads**](#downloads)
* [Source Code](#source-code)
* [**FAQ**](#faq)
* [Building Instructions](#building-instructions)
* [Design Documentation](#design-documentation)
* [**Contributing, Reporting, Contacting**](#contributing-reporting-contacting)
* [Credits](#credits)
* [Related Projects](#related-projects)
* [License](#license)
## Motivation and Philosophy
Without signing in to a Google Account, Chromium does pretty well in terms of security and privacy. However, Chromium still has some dependency on Google web services and binaries. In addition, Google designed Chromium to be easy and intuitive for users, which means they compromise on transparency and control of internal operations.
ungoogled-chromium addresses these issues in the following ways:
1. Remove all remaining background requests to any web services while building and running the browser
2. Remove all code specific to Google web services
3. Remove all uses of pre-made binaries from the source code, and replace them with user-provided alternatives when possible.
4. Disable features that inhibit control and transparency, and add or modify features that promote them (these changes will almost always require manual activation or enabling).
These features are implemented as configuration flags, patches, and custom scripts. For more details, consult the [Design Documentation](docs/design.md).
## Feature Overview
*This section overviews the features of ungoogled-chromium. For more detailed information, it is best to consult the source code.*
Contents of this section:
* [Key Features](#key-features)
* [Enhancing Features](#enhancing-features)
* [Borrowed Features](#borrowed-features)
* [Supported Platforms and Distributions](#supported-platforms-and-distributions)
### Key Features
*These are the core features introduced by ungoogled-chromium.*
* Disable functionality specific to Google domains (e.g. Google Host Detector, Google URL Tracker, Google Cloud Messaging, Google Hotwording, etc.)
* This includes disabling [Safe Browsing](https://en.wikipedia.org/wiki/Google_Safe_Browsing). Consult [the FAQ for the rationale](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq#why-is-safe-browsing-disabled).
* Block internal requests to Google at runtime. This feature is a fail-safe measure for the above, in case Google changes or introduces new components that our patches do not disable. This feature is implemented by replacing many Google web domains in the source code with non-existent alternatives ending in `qjz9zk` (known as domain substitution; [see docs/design.md](docs/design.md#source-file-processors) for details), then [modifying Chromium to block its own requests with such domains](patches/core/ungoogled-chromium/block-trk-and-subdomains.patch). In other words, no connections are attempted to the `qjz9zk` domain.
* Strip binaries from the source code (known as binary pruning; [see docs/design.md](docs/design.md#source-file-processors) for details)
### Enhancing Features
*These are the non-essential features introduced by ungoogled-chromium.*
* Add many new command-line switches and `chrome://flags` entries to configure new features (which are disabled by default). See [docs/flags.md](docs/flags.md) for the exhaustive list.
* Add *Suggestions URL* text field in the search engine editor (`chrome://settings/searchEngines`) for customizing search engine suggestions.
* Add more URL schemes allowed to save page schemes.
* Add Omnibox search provider "No Search" to allow disabling of searching
* Add a custom cross-platform build configuration and packaging wrapper for Chromium. It currently supports many Linux distributions, macOS, and Windows. (See [docs/design.md](docs/design.md) for details on the system.)
* Force all pop-ups into tabs
* Disable automatic formatting of URLs in Omnibox (e.g. stripping `http://`, hiding certain parameters)
* Disable intranet redirect detector (extraneous DNS requests)
* This breaks captive portal detection, but captive portals still work.
* (Iridium Browser feature change) Prevent URLs with the `trk:` scheme from connecting to the Internet
* Also prevents any URLs with the top-level domain `qjz9zk` (as used in domain substitution) from attempting a connection.
* (Windows-specific) Do not set the Zone Identifier on downloaded files
### Borrowed Features
In addition to the features introduced by ungoogled-chromium, ungoogled-chromium selectively borrows many features from the following projects (in approximate order of significance):
* [Inox patchset](https://github.com/gcarq/inox-patchset)
* [Bromite](https://github.com/bromite/bromite)
* [Debian](https://tracker.debian.org/pkg/chromium)
* [Iridium Browser](https://iridiumbrowser.de/)
### Supported Platforms and Distributions
[See docs/platforms.md for a list of supported platforms](docs/platforms.md).
Other platforms are discussed and tracked in this repository's Issue Tracker. Learn more about using the Issue Tracker under the section [Contributing, Reporting, Contacting](#contributing-reporting-contacting).
<div align="center">
<br/>
<p>
<img src="resources/branding/app_icon/raw.png"
title="Helium" alt="Helium logo" width="120" />
<h1>Helium</h1>
</p>
<p width="120">
The Chromium-based web browser made for people, with love.
<br>
Best privacy by default, unbiased ad-blocking, no bloat and no noise.
</p>
<a href="https://helium.computer/">
helium.computer
</a>
<br/>
</div>
## Downloads
> [!NOTE]
> Helium is still in beta, so unexpected issues may occur. We are not responsible
for any damage caused by usage of beta software.
### Automated or maintained builds
Best way to download Helium is to open [helium.computer](https://helium.computer/) on your computer.
It'll pick the right build for your OS and architecture automatically.
ungoogled-chromium is available in the following **software repositories**:
If you wish to download builds "straight from the tap" with all options in one place,
you can do it on GitHub in the Releases section in each platform's repo:
- [macOS](https://github.com/imputnet/helium-macos/releases/latest)
- [Linux](https://github.com/imputnet/helium-linux/releases/latest) (AppImage)
- [Windows](https://github.com/imputnet/helium-windows/releases/latest) (no auto-updates yet)
* Arch: Available in the AUR, [see instructions in ungoogled-chromium-archlinux](https://github.com/ungoogled-software/ungoogled-chromium-archlinux)
* Debian & Ubuntu: Available in OBS, find your [distribution specific instructions](https://github.com/ungoogled-software/ungoogled-chromium-debian) in the Installing section
* Fedora: Available in [COPR](https://copr.fedorainfracloud.org/coprs/) as [`wojnilowicz/ungoogled-chromium`](https://copr.fedorainfracloud.org/coprs/wojnilowicz/ungoogled-chromium/). Also available in [RPM Fusion](https://rpmfusion.org/Configuration) as `chromium-browser-privacy` (outdated).
* Gentoo: Available in [`::pf4public`](https://github.com/PF4Public/gentoo-overlay) overlay as [`ungoogled-chromium`](https://github.com/PF4Public/gentoo-overlay/tree/master/www-client/ungoogled-chromium) and [`ungoogled-chromium-bin`](https://github.com/PF4Public/gentoo-overlay/tree/master/www-client/ungoogled-chromium-bin) ebuilds
* [OpenMandriva](https://openmandriva.org/) includes ungoogled-chromium as its main browser. The `chromium` package includes all ungoogling patches.
* macOS: Available in [Homebrew](https://brew.sh/) as [`eloston-chromium`](https://formulae.brew.sh/cask/eloston-chromium). Just run `brew install --cask eloston-chromium`. Chromium will appear in your `/Applications` directory.
* FreeBSD: Available in pkg as [`www/ungoogled-chromium`](https://www.freshports.org/www/ungoogled-chromium/).
## Platform packaging
Helium is available on all major desktop platforms, with entirety of source code
for all of them published here:
- [Helium for macOS](https://github.com/imputnet/helium-macos)
- [Helium for Linux](https://github.com/imputnet/helium-linux)
- [Helium for Windows](https://github.com/imputnet/helium-windows)
If your GNU/Linux distribution is not listed, there are distro-independent builds available via the following **package managers**:
* Flatpak: Available [in the Flathub repo](https://flathub.org/apps/details/io.github.ungoogled_software.ungoogled_chromium) as `io.github.ungoogled_software.ungoogled_chromium`
* GNU Guix: Available as `ungoogled-chromium`
* NixOS/nixpkgs: Available as `ungoogled-chromium`
### Third-party binaries
If your operating system is not listed above, you can also try to [**Download binaries from here**](https://ungoogled-software.github.io/ungoogled-chromium-binaries/)
*NOTE: These binaries are provided by anyone who are willing to build and submit them. Because these binaries are not necessarily [reproducible](https://reproducible-builds.org/), authenticity cannot be guaranteed; In other words, there is always a non-zero probability that these binaries may have been tampered with. In the unlikely event that this has happened to you, please [report it in a new issue](#contributing-reporting-contacting).*
These binaries are known as **contributor binaries**.
## Source Code
This repository only contains the common code for all platforms; it does not contain all the configuration and scripts necessary to build ungoogled-chromium. Most users will want to use platform-specific repos, where all the remaining configuration and scripts are provided for specific platforms:
[**Find the repo for a specific platform here**](docs/platforms.md).
If you wish to include ungoogled-chromium code in your own build process, consider using [the tags in this repo](https://github.com/ungoogled-software/ungoogled-chromium/tags). These tags follow the format `{chromium_version}-{revision}` where
* `chromium_version` is the version of Chromium used in `x.x.x.x` format, and
* `revision` is a number indicating the version of ungoogled-chromium for the corresponding Chromium version.
Additionally, most platform-specific repos extend their tag scheme upon this one.
**Building the source code**: [See docs/building.md](docs/building.md)
### Mirrors
List of mirrors:
* [Codeberg](https://codeberg.org): [main repo](https://codeberg.org/ungoogled-software/ungoogled-chromium) and [ungoogled-software](https://codeberg.org/ungoogled-software)
## FAQ
[See the frequently-asked questions (FAQ) on the Wiki](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq)
## Building Instructions
[See docs/building.md](docs/building.md)
## Design Documentation
[See docs/design.md](docs/design.md)
## Contributing, Reporting, Contacting
* For reporting and contacting, see [SUPPORT.md](SUPPORT.md)
* If you're willing to help, check out the [Issue Tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues) and especially issues, which [need help](https://github.com/ungoogled-software/ungoogled-chromium/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
* For contributing (e.g. how to help, submitting changes, criteria for new features), see [docs/contributing.md](docs/contributing.md)
* If you have some small contributions that don't fit our criteria, consider adding them to [ungoogled-software/contrib](https://github.com/ungoogled-software/contrib) or [our Wiki](https://github.com/ungoogled-software/ungoogled-chromium-wiki) instead.
## Other Helium repos
Along with the main repo and platform packaging, these projects are also a part of Helium:
- [Helium services](https://github.com/imputnet/helium-services)
- [Helium onboarding](https://github.com/imputnet/helium-onboarding) (the onboarding page seen in Helium at `helium://setup`)
- [uBlock Origin packaging](https://github.com/imputnet/ublock-origin-crx)
## Credits
### ungoogled-chromium
Helium is proudly based on [ungoogled-chromium](https://github.com/ungoogled-software/ungoogled-chromium).
It wouldn't be possible for us to get rid of Google's bloat and get a development+building pipeline this fast without it.
Huge shout-out to everyone behind this amazing project!
(and we intend to contribute even more stuff upstream in the future)
* [The Chromium Project](https://www.chromium.org/)
* [Inox patchset](https://github.com/gcarq/inox-patchset)
* [Debian](https://tracker.debian.org/pkg/chromium-browser)
* [Bromite](https://github.com/bromite/bromite)
* [Iridium Browser](https://iridiumbrowser.de/)
* The users for testing and debugging, [contributing code](https://github.com/ungoogled-software/ungoogled-chromium/graphs/contributors), providing feedback, or simply using ungoogled-chromium in some capacity.
### The Chromium project
[The Chromium Project](https://www.chromium.org/) is obviously at the core of Helium,
making it possible to exist in the first place.
## Related Projects
List of known projects that fork or use changes from ungoogled-chromium:
* [Bromite](https://github.com/bromite/bromite) (Borrows some patches. Features builds for Android)
* [ppc64le fork](https://github.com/leo-lb/ungoogled-chromium) (Fork with changes to build for ppc64le CPUs)
### ungoogled-chromium's dependencies
- [Inox patchset](https://github.com/gcarq/inox-patchset)
- [Debian](https://tracker.debian.org/pkg/chromium-browser)
- [Bromite](https://github.com/bromite/bromite)
- [Iridium Browser](https://iridiumbrowser.de/)
## License
All code, patches, modified portions of imported code or patches, and
any other content that is unique to Helium and not imported from other
repositories is licensed under GPL-3.0. See [LICENSE](LICENSE).
Any content imported from other projects retains its original license (for
example, any original unmodified code imported from ungoogled-chromium remains
licensed under their [BSD 3-Clause license](https://github.com/ungoogled-software/ungoogled-chromium/blob/464e163fb067ad1134ffb7da5b6d2da478d8939e/LICENSE)).
licensed under their [BSD 3-Clause license](LICENSE.ungoogled_chromium)).
## More documentation (soon)
> [!NOTE]
> We will add more documentation along with design and motivation guidelines in the future.
All docs will be linked here along with other related content.
-30
View File
@@ -1,30 +0,0 @@
# Support
**Before you submit feedback, please ensure you have tried the following**:
* Read the [FAQ](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq)
* If you are using a build for an officially-supported platform ([see the list here](docs/platforms.md)), then please refer to the [Platform-specific Support](#platform-specific-support) section first.
* Check if your feedback already exists in the [Issue Tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues) (make sure to search closed issues and use search filters, as applicable)
* If this is a problem, ensure it does *not* occur with regular Chromium or Google Chrome. If it does, then this is *not* a problem with ungoogled-chromium. Instead, please submit your feedback to the [Chromium bug tracker](https://bugs.chromium.org/p/chromium/issues/list) or Google.
* Read the documentation under [docs/](docs/)
There are a few channels for support:
* An issue tracker. Issue trackers are the main hubs for discussions and development activity, and thus the primary means of support. They includes problems, suggestions, and questions. If you are using a build for an officially-supported platform ([see the list here](docs/platforms.md)), then please refer to the [Platform-specific Support](#platform-specific-support) section to find its issue tracker. Otherwise, please use [the main issue tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues).
* A chat room. There are two options available:
* [Gitter](https://gitter.im/ungoogled-software/Lobby). It can use your GitHub account as an identity.
* Matrix.org under name `ungoogled-software/lobby`. It has a bidirectional connection with Gitter.
## Platform-specific Support
For officially-supported platforms, **please visit their issue trackers before using the issue tracker in this repository**:
* Android: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-android/issues)
* Arch Linux and derivatives (e.g. Manjaro): [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues)
* Debian & Ubuntu: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-debian/issues)
* Fedora & CentOS: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-fedora/issues)
* Flatpak: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-flatpak/issues)
* Gentoo ([@PF4Public](https://github.com/PF4Public)'s overlay): [Issue tracker](https://github.com/PF4Public/gentoo-overlay/issues?q=is%3Aissue++ungoogled-chromium+)
* macOS: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-macos/issues)
* Portable Linux: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/issues)
* Windows: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-windows/issues)
+1 -1
View File
@@ -1 +1 @@
136.0.7103.92
145.0.7632.75
+24
View File
@@ -0,0 +1,24 @@
# Everything that's downloaded after cloning Chromium goes here.
# It will not work from main downloads.ini
[search_engines_data]
url = https://gist.githubusercontent.com/wukko/2a591364dda346e10219e4adabd568b1/raw/e75ae3c4a1ce940ef7627916a48bc40882d24d40/nonfree-search-engines-data.tar.gz
download_filename = nonfree-search-engines-data.tar.gz
sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c
output_path = ./third_party/search_engines_data/resources_internal
[onboarding]
version = 202601021937
url = https://github.com/imputnet/helium-onboarding/releases/download/%(version)s/helium-onboarding-%(version)s.tar.gz
download_filename = onboarding-page-%(version)s.tar.gz
sha256 = c8a1f906cf6461179d4fd311c529f0f8e01fb21b63ef179f593a24190c5dca80
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.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
+136
View File
@@ -0,0 +1,136 @@
# pylint: disable=missing-function-docstring,invalid-name,global-statement,missing-module-docstring
# Copyright 2025 The Helium Authors
# You can use, redistribute, and/or modify this source code under
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
from third_party import unidiff
LICENSE_HEADER_IGNORES = ["html", "license", "readme", "deps"]
patches_dir = None
series = None
def _read_text(path):
with open(patches_dir / path, "r", encoding="utf-8") as f:
return filter(str, f.read().splitlines())
def _read_patch(path):
return unidiff.PatchSet('\n'.join(_read_text(path)))
def _init(root):
global patches_dir
global series
patches_dir = root / "patches"
series = set(_read_text("series"))
def a_all_patches_in_series_exist():
for patch in series:
assert (patches_dir / patch).is_file(), \
f"{patch} is in series, but does not exist in the source tree"
def a_all_patches_in_tree_are_in_series():
for patch in patches_dir.rglob('*'):
if not patch.is_file() or patch == patches_dir / "series":
continue
assert str(patch.relative_to(patches_dir)) in series, \
f"{patch} exists in source tree, but is not included in the series"
def b_all_patches_have_meaningful_contents():
for patch in series:
assert any(l.startswith('+++ ') for l in _read_text(patch)), \
f"{patch} does not have any meaningful content"
def b_all_patches_have_no_trailing_whitespace():
for patch in series:
for i, line in enumerate(_read_text(patch)):
if not line.startswith('+ '):
continue
assert not line.endswith(' '), \
f"{patch} contains trailing whitespace on line {i + 1}"
def c_all_new_files_have_license_header():
for patch in series:
if 'helium' not in patch:
continue
added_files = filter(lambda f: f.is_added_file, _read_patch(patch))
for file in added_files:
if any(p in file.path.lower() for p in LICENSE_HEADER_IGNORES):
continue
assert any('terms of the GPL-3.0 license' in str(hunk) for hunk in file), \
f"File {file.path} was added in {patch}, but contains no Helium license header"
def c_all_new_headers_have_correct_guard():
for patch in series:
if 'helium' not in patch:
continue
added_files = filter(lambda f: f.is_added_file and f.path.endswith('.h'),
_read_patch(patch))
for file in added_files:
expected_macro_name = file.path.upper() \
.replace('.', '_') \
.replace('/', '_') + '_'
assert len(file) == 1
expected = {
"ifndef": f'#ifndef {expected_macro_name}',
"define": f'#define {expected_macro_name}'
}
found = {
"ifndef": None,
"define": None,
}
for _line in file[0]:
line = str(_line)
if expected["ifndef"] in line:
assert found["define"] is None
assert found["ifndef"] is None
found["ifndef"] = line
elif expected["define"] in line:
assert found["ifndef"] is not None
assert found["define"] is None
found["define"] = line
for macro_type, value in found.items():
value_print = (value or '(none)').rstrip()
assert value == f"+{expected[macro_type]}\n", \
f"Patch {patch} has unexpected {macro_type} in {file.path}:" \
f"{value_print}, expecting: {expected[macro_type]}"
def d_no_whitespace_only_changes():
for patch in series:
if 'helium' not in patch:
continue
for file in _read_patch(patch):
for hunk in file:
seen_nonws = False
for line in hunk:
line = str(line)
if line.startswith('+') or line.startswith('-'):
seen_nonws = seen_nonws or len(line.rstrip()) > 1
assert seen_nonws, \
f"Patch {patch} contains hunk consisting of "\
f"only whitespace characters in {file.path}: {hunk}"
+2 -1
View File
@@ -3,7 +3,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run sanity checking algorithms over downloads.ini files
It checks the following:
@@ -21,6 +21,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from downloads import DownloadInfo, schema
sys.path.pop(0)
+2 -3
View File
@@ -2,7 +2,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""
Checks if files in a list exist.
@@ -27,8 +27,7 @@ def main():
Path(input_name).read_text(encoding='UTF-8').splitlines()))
for file_name in file_iter:
if not Path(args.root_dir, file_name).exists():
print('ERROR: Path "{}" from file "{}" does not exist.'.format(
file_name, input_name),
print(f'ERROR: Path "{file_name}" from file "{input_name}" does not exist.',
file=sys.stderr)
sys.exit(1)
+2 -1
View File
@@ -3,7 +3,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run sanity checking algorithms over GN flags
It checks the following:
@@ -21,6 +21,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import ENCODING, get_logger
sys.path.pop(0)
+2 -1
View File
@@ -3,7 +3,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run sanity checking algorithms over ungoogled-chromium's patch files
It checks the following:
@@ -24,6 +24,7 @@ from third_party import unidiff
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import ENCODING, get_logger, parse_series # pylint: disable=wrong-import-order
sys.path.pop(0)
# File suffixes to ignore for checking unused patches
+61
View File
@@ -0,0 +1,61 @@
// 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.
// Program for updating the assets.json file in uB0 to disable all
// outgoing connections before the user is able to consent to them.
const fs = require('fs');
const err = () => {
console.error('usage: node clear-ublock-assets <path to uB0 assets.json');
process.exit(1);
}
const assets_path = process.argv[2] || err();
const stripURLs = (c) =>
[c].flat().filter(s => !URL.canParse(s));
const breakKey = (obj, key_) => {
const keys = Object.keys(obj);
const idx = keys.indexOf(key_);
if (idx === -1) {
return;
}
for (let key of keys.splice(idx)) {
const val = obj[key];
delete obj[key];
if (key === key_) {
key = `^${key}`;
}
obj[key] = val;
}
}
const clear = obj => {
for (const filter of Object.values(obj)) {
if (filter.off) {
continue;
}
filter.contentURL = stripURLs(filter.contentURL);
breakKey(filter, 'cdnURLs');
breakKey(filter, 'patchURLs');
}
return obj;
}
fs.writeFileSync(
assets_path,
JSON.stringify(clear(
JSON.parse(fs.readFileSync(
assets_path
))
), null, '\t') + '\n'
);
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
# Copyright 2025 The Helium Authors
# You can use, redistribute, and/or modify this source code under
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
"""Script to run sanity checks against the Helium patchset."""
import sys
import inspect
import argparse
from pathlib import Path
import _lint_tests
def parse_args():
"""Parses the CLI arguments."""
parser = argparse.ArgumentParser()
parser.add_argument('-t', '--tree', help='root of the source tree to check')
return parser.parse_args()
def main():
"""CLI entrypoint for executing tests"""
args = parse_args()
root_dir = (Path(__file__).parent / "..").resolve()
if args.tree:
root_dir = Path(args.tree).resolve()
_lint_tests._init(root_dir) # pylint: disable=protected-access
for name, func in inspect.getmembers(_lint_tests, inspect.isfunction):
if name.startswith("_"):
continue
try:
func()
print(f"[OK] {name}")
except Exception:
print(f"[ERR] {name}:", file=sys.stderr)
raise
if __name__ == '__main__':
main()
+2 -3
View File
@@ -2,7 +2,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run Pylint over devutils"""
import argparse
@@ -23,7 +23,6 @@ def main():
disables = [
'wrong-import-position',
'bad-continuation',
'duplicate-code',
]
@@ -33,7 +32,7 @@ def main():
disables.append('locally-disabled')
pylint_options = [
'--disable={}'.format(','.join(disables)),
f"--disable={','.join(disables)}",
'--jobs=4',
'--score=n',
'--persistent=n',
+6 -6
View File
@@ -2,7 +2,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run Pylint over any module"""
import argparse
@@ -18,6 +18,7 @@ class ChangeDir:
"""
Changes directory to path in with statement
"""
def __init__(self, path):
self._path = path
self._orig_path = os.getcwd()
@@ -31,12 +32,12 @@ class ChangeDir:
def run_pylint(module_path, pylint_options, ignore_prefixes=tuple()):
"""Runs Pylint. Returns a boolean indicating success"""
pylint_stats = Path('/run/user/{}/pylint_stats'.format(os.getuid()))
pylint_stats = Path(f'/run/user/{os.getuid()}/pylint_stats')
if not pylint_stats.parent.is_dir(): #pylint: disable=no-member
pylint_stats = Path('/run/shm/pylint_stats')
os.environ['PYLINTHOME'] = str(pylint_stats)
input_paths = list()
input_paths = []
if not module_path.exists():
print('ERROR: Cannot find', module_path)
sys.exit(1)
@@ -75,12 +76,11 @@ def main():
args = parser.parse_args()
if not args.module_path.exists():
print('ERROR: Module path "{}" does not exist'.format(args.module_path))
print(f'ERROR: Module path "{args.module_path}" does not exist')
sys.exit(1)
disables = [
'wrong-import-position',
'bad-continuation',
]
if args.hide_fixme:
@@ -89,7 +89,7 @@ def main():
disables.append('locally-disabled')
pylint_options = [
'--disable={}'.format(','.join(disables)),
f"--disable={','.join(disables)}",
'--jobs=4',
'--score=n',
'--persistent=n',
+6 -9
View File
@@ -2,7 +2,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run Pylint over utils"""
import argparse
@@ -21,21 +21,18 @@ def main():
help='Show "locally-disabled" Pylint warnings.')
args = parser.parse_args()
disable = ['bad-continuation']
if args.hide_fixme:
disable.append('fixme')
if not args.show_locally_disabled:
disable.append('locally-disabled')
pylint_options = [
'--disable={}'.format(','.join(disable)),
'--jobs=4',
'--max-args=7',
'--score=n',
'--persistent=n',
]
if args.hide_fixme:
pylint_options.append('--disable=fixme')
if not args.show_locally_disabled:
pylint_options.append('--disable=locally-disabled')
ignore_prefixes = [
('third_party', ),
('tests', ),
+2 -2
View File
@@ -11,8 +11,8 @@ set -gx QUILT_PATCHES "$REPO_ROOT/patches"
set -gx QUILT_PUSH_ARGS "--color=auto"
set -gx QUILT_DIFF_OPTS "--show-c-function"
set -gx QUILT_PATCH_OPTS "--unified --reject-format=unified"
set -gx QUILT_DIFF_ARGS "-p ab --no-timestamps --no-index --color=auto --sort"
set -gx QUILT_REFRESH_ARGS "-p ab --no-timestamps --no-index --sort --strip-trailing-whitespace"
set -gx QUILT_DIFF_ARGS "-p ab --no-timestamps --no-index --color=auto"
set -gx QUILT_REFRESH_ARGS "-p ab --no-timestamps --no-index --strip-trailing-whitespace"
set -gx QUILT_COLORS "diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
set -gx QUILT_SERIES_ARGS "--color=auto"
set -gx QUILT_PATCHES_ARGS "--color=auto"
+5 -3
View File
@@ -17,8 +17,8 @@ export QUILT_PATCHES="$REPO_ROOT/patches"
export QUILT_PUSH_ARGS="--color=auto"
export QUILT_DIFF_OPTS="--show-c-function"
export QUILT_PATCH_OPTS="--unified --reject-format=unified"
export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto --sort"
export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --sort --strip-trailing-whitespace"
export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --strip-trailing-whitespace"
export QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
export QUILT_SERIES_ARGS="--color=auto"
export QUILT_PATCHES_ARGS="--color=auto"
@@ -26,4 +26,6 @@ export QUILT_PATCHES_ARGS="--color=auto"
export LC_ALL=C
# When non-default less options are used, add the -R option so that less outputs
# ANSI color escape codes "raw".
[ -n "$LESS" -a -z "${QUILT_PAGER+x}" ] && export QUILT_PAGER="less -FRX"
if [ -n "${LESS-}" -a -z "${QUILT_PAGER+x}" ]; then
export QUILT_PAGER="less -FRX"
fi
+7 -4
View File
@@ -2,7 +2,7 @@
# Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Test check_patch_files.py"""
import logging
@@ -11,11 +11,13 @@ import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils'))
from _common import get_logger, set_logging_level
from _common import ENCODING, get_logger, set_logging_level
sys.path.pop(0)
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from check_patch_files import check_series_duplicates
sys.path.pop(0)
@@ -33,7 +35,7 @@ def test_check_series_duplicates():
'a.patch',
'b.patch',
'c.patch',
]))
]), encoding=ENCODING)
assert not check_series_duplicates(patches_dir)
get_logger().info('Check duplicates')
@@ -42,7 +44,8 @@ def test_check_series_duplicates():
'b.patch',
'c.patch',
'a.patch',
]))
]),
encoding=ENCODING)
assert check_series_duplicates(patches_dir)
+6 -4
View File
@@ -2,7 +2,7 @@
# Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Test validate_patches.py"""
import logging
@@ -11,11 +11,13 @@ import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils'))
from _common import get_logger, set_logging_level
from _common import ENCODING, get_logger, set_logging_level
sys.path.pop(0)
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
import validate_patches
sys.path.pop(0)
@@ -30,8 +32,8 @@ def test_test_patches():
def _run_test_patches(patch_content):
with tempfile.TemporaryDirectory() as tmpdirname:
Path(tmpdirname, 'foobar.txt').write_text(orig_file_content)
Path(tmpdirname, 'test.patch').write_text(patch_content)
Path(tmpdirname, 'foobar.txt').write_text(orig_file_content, encoding=ENCODING)
Path(tmpdirname, 'test.patch').write_text(patch_content, encoding=ENCODING)
_, patch_cache = validate_patches._load_all_patches(series_iter, Path(tmpdirname))
required_files = validate_patches._get_required_files(patch_cache)
files_under_test = validate_patches._retrieve_local_files(required_files,
+11 -8
View File
@@ -6,8 +6,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""
Update binary pruning and domain substitution lists automatically.
@@ -28,6 +27,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import get_logger
from domain_substitution import DomainRegexList, TREE_ENCODINGS
from prune_binaries import CONTINGENT_PATHS
sys.path.pop(0)
# Encoding for output files
@@ -66,10 +66,11 @@ 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',
# Exclusion for zoneinfo64
'third_party/rust/chromium_crates_io/vendor/zoneinfo64-v0_2/src/data/zoneinfo64.res',
# Exclusions for safe file extensions
'*.avif',
'*.ttf',
@@ -81,6 +82,7 @@ PRUNING_EXCLUDE_PATTERNS = [
'*.mp3',
'*.wav',
'*.flac',
'*.car',
'*.icns',
'*.woff',
'*.woff2',
@@ -102,6 +104,7 @@ PRUNING_EXCLUDE_PATTERNS = [
'*.js',
'*.json',
'*.txt',
'*.binarypb',
'*.xtb'
]
@@ -118,14 +121,13 @@ DOMAIN_EXCLUDE_PREFIXES = [
'third_party/blink/renderer/core/dom/document.cc',
# Exclusion to allow download of sysroots
'build/linux/sysroot_scripts/sysroots.json',
# Licenses and credits
'tools/licenses/licenses.py',
# Google Web Store extension stuff
'tools/search_engine_choice/generate_search_engine_icons.py',
'extensions/common/api/_api_features.json',
'chrome/common/extensions/api/_api_features.json',
'extensions/common/extension_urls.cc',
'extensions/browser/updater/safe_manifest_parser.cc',
# License/credits stuff
'tools/licenses/licenses.py',
]
# pylint: enable=line-too-long
@@ -256,6 +258,7 @@ def should_domain_substitute(path, relative_path, search_regex, used_dep_set, us
if relative_path_posix.startswith(exclude_prefix):
used_dep_set.add(exclude_prefix)
return False
# Skip LICENSE.* files so that they remain untouched.
for license_path in ['license', 'license.txt', 'license.html']:
if relative_path_posix.endswith('/' + license_path):
return False
@@ -399,9 +402,9 @@ def main(args_list=None):
args.tree,
DomainRegexList(args.domain_regex).search_regex, args.processes)
with args.pruning.open('w', encoding=_ENCODING) as file_obj:
file_obj.writelines('%s\n' % line for line in pruning_set)
file_obj.writelines(f'{line}\n' for line in pruning_set)
with args.domain_substitution.open('w', encoding=_ENCODING) as file_obj:
file_obj.writelines('%s\n' % line for line in domain_substitution_set)
file_obj.writelines(f'{line}\n' for line in domain_substitution_set)
if unused_patterns.log_unused(args.error_unused) and args.error_unused:
get_logger().error('Please update or remove unused patterns and/or prefixes. '
'The lists have still been updated with the remaining valid entries.')
+17 -20
View File
@@ -1,14 +1,9 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2025 The Helium Authors
# You can use, redistribute, and/or modify this source code under
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""
Utility to ease the updating of platform patches against ungoogled-chromium's patches
"""
@@ -22,6 +17,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import ENCODING, get_logger
from patches import merge_patches
sys.path.pop(0)
_SERIES = 'series'
@@ -67,19 +63,19 @@ def _dir_empty(path):
return False
def _rename_files_with_dirs(root_dir, sorted_file_iter):
def _rename_files_with_dirs(root_dir, source_dir, sorted_file_iter):
'''
Moves a list of sorted files back to the upstream repo, removing empty directories along the way
Moves a list of sorted files back to their original location,
removing empty directories along the way
'''
past_parent = None
upstream_path = Path(os.path.dirname(os.path.realpath(__file__))) / '../patches'
for partial_path in sorted_file_iter:
complete_path = Path(root_dir, partial_path)
complete_upstream_path = Path(upstream_path, partial_path)
complete_source_path = Path(source_dir, partial_path)
try:
complete_path.rename(complete_upstream_path)
complete_path.rename(complete_source_path)
except FileNotFoundError:
get_logger().warning('Could not remove prepended patch: %s', complete_path)
get_logger().warning('Could not move prepended patch: %s', complete_path)
if past_parent != complete_path.parent:
while past_parent and _dir_empty(past_parent):
past_parent.rmdir()
@@ -91,7 +87,7 @@ def _rename_files_with_dirs(root_dir, sorted_file_iter):
complete_path = complete_path.parent
def unmerge_platform_patches(platform_patches_dir):
def unmerge_platform_patches(platform_patches_dir, prepend_patches_dir):
'''
Undo merge_platform_patches(), adding any new patches from series.merged as necessary
@@ -105,8 +101,8 @@ def unmerge_platform_patches(platform_patches_dir):
filter(len,
(platform_patches_dir / _SERIES_PREPEND).read_text(encoding=ENCODING).splitlines()))
# Move prepended files to original location, preserving changes, and clean up
_rename_files_with_dirs(platform_patches_dir, sorted(prepend_series))
# Move prepended files back to original location, preserving changes
_rename_files_with_dirs(platform_patches_dir, prepend_patches_dir, sorted(prepend_series))
# Determine positions of blank spaces in series.orig
if not (platform_patches_dir / _SERIES_ORIG).exists():
@@ -114,14 +110,14 @@ def unmerge_platform_patches(platform_patches_dir):
return False
orig_series = (platform_patches_dir / _SERIES_ORIG).read_text(encoding=ENCODING).splitlines()
# patch path -> list of lines after patch path and before next patch path
path_comments = dict()
path_comments = {}
# patch path -> inline comment for patch
path_inline_comments = dict()
path_inline_comments = {}
previous_path = None
for partial_path in orig_series:
if not partial_path or partial_path.startswith('#'):
if partial_path not in path_comments:
path_comments[previous_path] = list()
path_comments[previous_path] = []
path_comments[previous_path].append(partial_path)
else:
path_parts = partial_path.split(' #', maxsplit=1)
@@ -175,10 +171,11 @@ def main():
repo_dir = Path(__file__).resolve().parent.parent
success = False
prepend_patches_dir = repo_dir / 'patches'
if args.command == 'merge':
success = merge_platform_patches(args.platform_patches, repo_dir / 'patches')
success = merge_platform_patches(args.platform_patches, prepend_patches_dir)
elif args.command == 'unmerge':
success = unmerge_platform_patches(args.platform_patches)
success = unmerge_platform_patches(args.platform_patches, prepend_patches_dir)
else:
raise NotImplementedError(args.command)
+1 -1
View File
@@ -3,7 +3,7 @@
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""Run sanity checking algorithms over ungoogled-chromium's config files
NOTE: This script is hardcoded to run over ungoogled-chromium's config files only.
+31 -30
View File
@@ -3,7 +3,7 @@
# Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# found in the LICENSE.ungoogled_chromium file.
"""
Validates that all patches apply cleanly against the source tree.
@@ -23,12 +23,14 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent / 'third_party'))
import unidiff
from unidiff.constants import LINE_TYPE_EMPTY, LINE_TYPE_NO_NEWLINE
sys.path.pop(0)
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from domain_substitution import TREE_ENCODINGS
from _common import ENCODING, get_logger, get_chromium_version, parse_series, add_common_params
from patches import dry_run_check
sys.path.pop(0)
try:
@@ -38,6 +40,7 @@ try:
class _VerboseRetry(urllib3.util.Retry):
"""A more verbose version of HTTP Adatper about retries"""
def sleep_for_retry(self, response=None):
"""Sleeps for Retry-After, and logs the sleep time"""
if response:
@@ -94,22 +97,22 @@ 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
"""Override Call syntax handling"""
if node.func.id not in self._allowed_callables:
raise _UnexpectedSyntaxError('Unexpected call of "%s" at line %s, column %s' %
(node.func.id, node.lineno, node.col_offset))
raise _UnexpectedSyntaxError(f'Unexpected call of "{node.func.id}" '
f'at line {node.lineno}, column {node.col_offset}')
def generic_visit(self, node):
for ast_type in self._valid_syntax_types:
if isinstance(node, ast_type):
super().generic_visit(node)
return
raise _UnexpectedSyntaxError('Unexpected {} at line {}, column {}'.format(
type(node).__name__, node.lineno, node.col_offset))
raise _UnexpectedSyntaxError(f'Unexpected {type(node).__name__} '
f'at line {node.lineno}, column {node.col_offset}')
def _validate_deps(deps_text):
@@ -124,6 +127,7 @@ def _validate_deps(deps_text):
def _deps_var(deps_globals):
"""Return a function that implements DEPS's Var() function"""
def _var_impl(var_name):
"""Implementation of Var() in DEPS"""
return deps_globals['vars'][var_name]
@@ -145,8 +149,8 @@ def _download_googlesource_file(download_session, repo_url, version, relative_pa
googlesource.com repo as a string.
"""
if 'googlesource.com' not in repo_url:
raise ValueError('Repository URL is not a googlesource.com URL: {}'.format(repo_url))
full_url = repo_url + '/+/{}/{}?format=TEXT'.format(version, str(relative_path))
raise ValueError(f'Repository URL is not a googlesource.com URL: {repo_url}')
full_url = repo_url + f'/+/{version}/{str(relative_path)}?format=TEXT'
get_logger().debug('Downloading: %s', full_url)
response = download_session.get(full_url)
if response.status_code == 404:
@@ -172,13 +176,13 @@ def _get_dep_value_url(deps_globals, dep_value):
# Probably a Python format string
url = url.format(**deps_globals['vars'])
if url.count('@') != 1:
raise _PatchValidationError('Invalid number of @ symbols in URL: {}'.format(url))
raise _PatchValidationError(f'Invalid number of @ symbols in URL: {url}')
return url
def _process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_relative_paths):
"""Helper for _get_child_deps_tree"""
for dep_path_str, dep_value in deps_globals.get('deps', dict()).items():
for dep_path_str, dep_value in deps_globals.get('deps', {}).items():
url = _get_dep_value_url(deps_globals, dep_value)
if url is None:
continue
@@ -200,7 +204,7 @@ def _process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_re
grandchild_deps_tree = recursedeps_item_depsfile
if grandchild_deps_tree is None:
# This dep is not recursive; i.e. it is fully loaded
grandchild_deps_tree = dict()
grandchild_deps_tree = {}
child_deps_tree[dep_path] = (*url.split('@'), grandchild_deps_tree)
@@ -211,7 +215,7 @@ def _get_child_deps_tree(download_session, current_deps_tree, child_path, deps_u
# Load unloaded DEPS
deps_globals = _parse_deps(
_download_googlesource_file(download_session, repo_url, version, child_deps_tree))
child_deps_tree = dict()
child_deps_tree = {}
current_deps_tree[child_path] = (repo_url, version, child_deps_tree)
deps_use_relative_paths = deps_globals.get('use_relative_paths', False)
_process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_relative_paths)
@@ -221,9 +225,8 @@ def _get_child_deps_tree(download_session, current_deps_tree, child_path, deps_u
def _get_last_chromium_modification():
"""Returns the last modification date of the chromium-browser-official tar file"""
with _get_requests_session() as session:
response = session.head(
'https://storage.googleapis.com/chromium-browser-official/chromium-{}.tar.xz'.format(
get_chromium_version()))
response = session.head('https://storage.googleapis.com/chromium-browser-official/'
f'chromium-{get_chromium_version()}.tar.xz')
response.raise_for_status()
return email.utils.parsedate_to_datetime(response.headers['Last-Modified'])
@@ -235,7 +238,7 @@ def _get_gitiles_git_log_date(log_entry):
def _get_gitiles_commit_before_date(repo_url, target_branch, target_datetime):
"""Returns the hexadecimal hash of the closest commit before target_datetime"""
json_log_url = '{repo}/+log/{branch}?format=JSON'.format(repo=repo_url, branch=target_branch)
json_log_url = f'{repo_url}/+log/{target_branch}?format=JSON'
with _get_requests_session() as session:
response = session.get(json_log_url)
response.raise_for_status()
@@ -410,7 +413,7 @@ def _retrieve_remote_files(file_iter):
Returns a dict of relative UNIX path strings to a list of lines in the file as strings
"""
files = dict()
files = {}
root_deps_tree = _initialize_deps_tree()
@@ -459,7 +462,7 @@ def _retrieve_local_files(file_iter, source_dir):
Returns a dict of relative UNIX path strings to a list of lines in the file as strings
"""
files = dict()
files = {}
for file_path in file_iter:
try:
raw_content = (source_dir / file_path).read_bytes()
@@ -473,7 +476,7 @@ def _retrieve_local_files(file_iter, source_dir):
except UnicodeDecodeError:
continue
if not content:
raise UnicodeDecodeError('Unable to decode with any encoding: %s' % file_path)
raise UnicodeDecodeError(f'Unable to decode with any encoding: {file_path}')
files[file_path] = content.split('\n')
if not files:
get_logger().error('All files used by patches are missing!')
@@ -488,7 +491,7 @@ def _modify_file_lines(patched_file, file_lines):
for hunk in patched_file:
# Validate hunk will match
if not hunk.is_valid():
raise _PatchValidationError('Hunk is not valid: {}'.format(repr(hunk)))
raise _PatchValidationError(f'Hunk is not valid: {repr(hunk)}')
line_cursor = hunk.target_start - 1
for line in hunk:
normalized_line = line.value.rstrip('\n')
@@ -497,18 +500,16 @@ def _modify_file_lines(patched_file, file_lines):
line_cursor += 1
elif line.is_removed:
if normalized_line != file_lines[line_cursor]:
raise _PatchValidationError(
"Line '{}' does not match removal line '{}' from patch".format(
file_lines[line_cursor], normalized_line))
raise _PatchValidationError(f"Line '{file_lines[line_cursor]}' does not match "
f"removal line '{normalized_line}' from patch")
del file_lines[line_cursor]
elif line.is_context:
if not normalized_line and line_cursor == len(file_lines):
# We reached the end of the file
break
if normalized_line != file_lines[line_cursor]:
raise _PatchValidationError(
"Line '{}' does not match context line '{}' from patch".format(
file_lines[line_cursor], normalized_line))
raise _PatchValidationError(f"Line '{file_lines[line_cursor]}' does not match "
f"context line '{normalized_line}' from patch")
line_cursor += 1
else:
assert line.line_type in (LINE_TYPE_EMPTY, LINE_TYPE_NO_NEWLINE)
@@ -592,7 +593,7 @@ def _load_all_patches(series_iter, patches_dir):
- dict of relative UNIX path strings to unidiff.PatchSet
"""
had_failure = False
unidiff_dict = dict()
unidiff_dict = {}
for relative_path in series_iter:
if relative_path in unidiff_dict:
continue
@@ -682,12 +683,12 @@ def main():
if args.cache_remote.parent.exists():
args.cache_remote.mkdir()
else:
parser.error('Parent of cache path {} does not exist'.format(args.cache_remote))
parser.error(f'Parent of cache path {args.cache_remote} does not exist')
if not args.series.is_file():
parser.error('--series path is not a file or not found: {}'.format(args.series))
parser.error(f'--series path is not a file or not found: {args.series}')
if not args.patches.is_dir():
parser.error('--patches path is not a directory or not found: {}'.format(args.patches))
parser.error(f'--patches path is not a directory or not found: {args.patches}')
series_iterable = tuple(parse_series(args.series))
had_failure, patch_cache = _load_all_patches(series_iterable, args.patches)
-76
View File
@@ -1,76 +0,0 @@
# Building ungoogled-chromium
The recommended way to build ungoogled-chromium is by consulting [the repository for your supported platform (links here)](platforms.md).
* *Linux users*: If your distribution is not listed, you will need to use Portable Linux.
If you want to add ungoogled-chromium to your existing Chromium build process, see the next section. Additionally, you may reference the repositories for supported platforms for inspiration.
## Integrating ungoogled-chromium into your Chromium build process
Typically, ungoogled-chromium is built from [code in platform-specific repositories](platforms.md). However, ungoogled-chromium can also be included in part or in whole into any custom Chromium build. In this section, **we will assume you already have a process to make your own Chromium builds**.
**NOTE**: You may need additional patches and/or build configuration for [your supported platform](platforms.md) because this repository does not contain all the code necessary for all platforms.
Before continuing, you may find it helpful to have a look through [the design documentation](design.md).
The following procedure outline the essential steps to build Chromium will all of ungoogled-chromium's features. **They are not sufficient to build ungoogled-chromium on their own**.
1. Ensure Chromium is downloaded, such as by `depot_tools`. In most of our supported platforms, we instead use a custom tool to do this.
```sh
mkdir -p build/download_cache
./utils/downloads.py retrieve -c build/download_cache -i downloads.ini
./utils/downloads.py retrieve -c build/download_cache -i extras.ini
./utils/downloads.py unpack -c build/download_cache -i downloads.ini -- build/src
./utils/downloads.py unpack -c build/download_cache -i extras.ini -- build/src
```
2. Prune binaries
```sh
./utils/prune_binaries.py build/src pruning.list
```
3. Apply patches
```sh
./utils/patches.py apply build/src patches
```
4. Substitute domains and names
```sh
./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c build/domsubcache.tar.gz build/src
./utils/name_substitution.sh" sub build/src
```
5. Build GN. If you are using `depot_tools` to checkout Chromium or you already have a GN binary, you should skip this step.
```sh
mkdir -p build/src/out/Default
cd build/src
./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/
```
6. Invoke the build:
```
mkdir -p build/src/out/Default
# NOTE: flags.gn contains only a subset of what is needed to run the build.
cp flags.gn build/src/out/Default/args.gn
cd build/src
# If you have additional GN flags to add, make sure to add them now.
./out/Default/gn gen out/Default --fail-on-unused-args
ninja -C out/Default chrome chromedriver chrome_sandbox
```
## Building FAQ
### My build keeps crashing because I run out of RAM! How can I fix it?
Here are several ways to address this, in decreasing order of preference:
1. Decrease the number of parallel threads to Ninja (the `-j` flag)
2. Add swap space
-52
View File
@@ -1,52 +0,0 @@
# Contributing
This document contains our criteria and guidelines for contributing to ungoogled-chromium.
If you have **small contributions that don't fit our criteria**, consider adding them to [ungoogled-software/contrib](https://github.com/ungoogled-software/contrib) or [our Wiki](https://github.com/ungoogled-software/ungoogled-chromium-wiki) instead.
If you are a developer of an **officially-supported platform**, be sure to check out the [Platform Repository Standards and Guidelines](repo_management.md).
List of contents:
* [How to help](#how-to-help)
* [Submitting changes](#submitting-changes)
* [Criteria for new features](#criteria-for-new-features)
### How to help
Generally, ungoogled-chromium needs contributors to help:
* Keep up-to-date with the latest stable Chromium, and any problematic changes in the new version that needs modification.
* Help with issues marked with the `help wanted` tag (usually either questions for other users, or request for help from other developers)
* Review Pull Requests from other contributors
* Implement feature requests ("enhancements" in the Issue Tracker), large or small.
* Implement issues marked with the `backlog` tag (that are closed).
* If it requires new code, please read through the [Submitting changes](#submitting-changes) section below.
In addition, anyone is free to help others in need of support in the Issue Tracker.
If there are fixes, tweaks, or additions you want to make, continue onto the following section.
### Submitting changes
Please submit all changes via Pull Requests.
Guidelines:
* You are welcome to submit minor changes, such as bug fixes, documentation fixes, and tweaks.
* If your change has an associated issue, please let others know that you are working on it.
* If you want to submit a new feature, please read through the [Criteria for new features](#criteria-for-new-features) below.
* When in doubt about the acceptance of a change, you are welcome to ask via an issue first.
### Criteria for new features
1. New features should not detract from the default Chromium experience, unless it falls under the project's main objectives (i.e. removing Google integration and enhancing privacy).
* For larger features, please propose them via an issue first.
2. New features should live behind a setting that is **off by default**.
* Settings are usually added via a command-line flag and `chrome://flags` entries. See [the relevant section in docs/developing.md](developing.md#adding-command-line-flags-and-chromeflags-options) for more information.
* Unless there are significant benefits, adding the setting to `chrome://settings` is *not recommended* due to the additional maintenance required (caused by the infrastructure that backs preferences).
**NOTE**: In the event that the codebase changes significantly for a non-essential patch (i.e. a patch that does not contribute to the main objectives of ungoogled-chromium), it will be removed until someone updates it.
-20
View File
@@ -1,20 +0,0 @@
# Default Settings
Vanilla Chromium settings are not often changed by ungoogled-chromium, however there are some exceptions.
Below is a list of the documented changes to the default Chromium settings.
Setting | New State | Location
-- | -- | --
Allow sites to check if you have payment methods saved | Disabled | chrome://settings/payments
Ask where to save each file before downloading | Enabled | chrome://settings/downloads
Auto sign-in | Disabled | chrome://settings/passwords
Block third-party cookies | Enabled | chrome://settings/cookies
Continue running background apps when Chromium is closed | Disabled | chrome://settings/system
Hyperlink auditing (\<a ping>) | Disabled | NA
Link Doctor | Disabled | NA
Offer to save passwords | Disabled | chrome://settings/passwords
Payment autofill | Disabled | chrome://settings/payments
Preload pages | Disabled | chrome://settings/cookies
Search suggestions | Disabled | chrome://settings/syncSetup
Show bookmark bar | Enabled | chrome://settings/appearance
WebRTC IP handling policy | Disable Non-Proxied UDP | `--webrtc-ip-handling-policy`
-118
View File
@@ -1,118 +0,0 @@
# Design
This document contains a high-level technical description of ungoogled-chromium and its components.
## Overview
ungoogled-chromium consists of the following major components:
* [Configuration](#configuration)
* [Configuration files](#configuration-files)
* [Source file processors](#source-file-processors)
* [Patches](#patches)
* [Packaging](#packaging)
The following sections describe each component.
## Configuration
Configuration is a broad term that refers to patches, build flags, and metadata about Chromium source code. It consists of the following components:
* [Configuration files](#configuration-files)
* [Source file processors](#source-file-processors)
* [Patches](#patches)
The following sections describe each component in more depth.
### Configuration Files
Configuration files (or config files) are files that store build configuration and source code changes for a build.
**IMPORTANT**: For consistency, all config files must be encoded in UTF-8.
List of configuration files:
* `chromium_version.txt` - The Chromium version used by ungoogled-chromium
* `revision.txt` - The revision of the changes on top of the given Chromium version.
* `pruning.list` - [See the Source File Processors section](#source-file-processors)
* `domain_regex.list` - [See the Source File Processors section](#source-file-processors)
* `domain_substitution.list` - [See the Source File Processors section](#source-file-processors)
* `downloads.ini` - Archives to download and unpack into the buildspace tree. This includes code not bundled in the Chromium source code archive that is specific to a non-Linux platform. On platforms such as macOS, this also includes a pre-built LLVM toolchain for convenience (which can be removed and built from source if desired).
* `flags.gn` - GN arguments to set before building.
### Source File Processors
Source file processors are utilities that directly manipulate the Chromium source tree before building. Currently, there are two such utilities: binary pruning, and domain substitution.
**Binary Pruning**: Strips binaries from the source code. This includes pre-built executables, shared libraries, and other forms of machine code. Most are substituted with system or user-provided equivalents, or are built from source; those binaries that cannot be removed do not contain machine code.
The list of files to remove are determined by the config file `pruning.list`. This config file is generated by `devutils/update_lists.py`.
**Domain Substitution**: Replaces Google and several other web domain names in the Chromium source code with non-existent alternatives ending in `qjz9zk`. These changes are mainly used as a backup measure to detect potentially unpatched requests to Google. Note that domain substitution is a crude process, and *may not be easily undone*.
With a few patches from ungoogled-chromium, any requests with these domain names sent via `net::URLRequest` in the Chromium code are blocked and notify the user via a info bar.
Similar to binary pruning, the list of files to modify are listed in `domain_substitution.list`; it is also updated with `devutils/update_lists.py`.
The regular expressions to use are listed in `domain_regex.list`; the search and replacement expressions are delimited with a pound (`#`) symbol. The restrictions for the entries are as follows:
* All replacement expressions must end in the TLD `qjz9zk`.
* The search and replacement expressions must have a one-to-one correspondence: no two search expressions can match the same string, and no two replacement expressions can result in the same string.
### Patches
All of ungoogled-chromium's patches for the Chromium source code are located in `patches/`. This directory conforms to the default GNU Quilt format. That is:
* All patches must reside inside `patches/`
* There is a `patches/series` text file that defines the order to apply all the patches. These patches are listed as a relative path from the `patches` directory.
* Lines starting with the pound symbol (`#`) are ignored
* For lines with patch paths: If there is a space followed by a pound symbol, the text after the patch path will be ignored.
All patch files in ungoogled-chromium must satisfy these formatting requirements:
* Patch filenames must end with the extension `.patch`
* The content must be in [unified format](https://en.wikipedia.org/wiki/Diff_utility#Unified_format).
* All paths in the hunk headers must begin after the first slash (which corresponds to the argument `-p1` for GNU patch).
* All patches must apply cleanly (i.e. no fuzz).
* It is recommended that hunk paths have the `a/` and `b/` prefixes, and a context of 3 (like the git default).
* All patches must be encoded in UTF-8 (i.e. same encoding as config files).
Patches are categorized into two directories directly under `patches/`:
1. **core**: Changes regarding background requests, code specific to Google web services, or code using pre-made binaries. They must be kept up-to-date with all of the changes in Chromium.
2. **extra**: Changes to features regarding control and transparency. They are not guaranteed to persist across updates to Chromium.
Within each category, patches are grouped by the following:
* `debian/` - Patches from Debian's Chromium
* Patches are not modified unless they conflict with Inox's patches
* These patches are not Debian-specific. For those, see the `debian/patches` directory
* `inox-patchset/` - Contains a modified subset of patches from Inox patchset.
* Some patches such as those that change branding are omitted
* Patches are not modified unless they do not apply cleanly onto the version of Chromium being built
* Patches are from [inox-patchset's GitHub](https://github.com/gcarq/inox-patchset)
* [Inox patchset's license](https://github.com/gcarq/inox-patchset/blob/master/LICENSE)
* `bromite/` - Patches from [Bromite](https://github.com/bromite/bromite)
* `iridium-browser/` - Contains a modified subset of patches from Iridium Browser.
* Some patches such as those that change branding or URLs to point to Iridium's own servers are omitted
* Patches are not modified unless they conflict with Debian's or Inox's patches
* Patches are from the `patchview` branch of Iridium's Git repository. [Git webview of the patchview branch](https://git.iridiumbrowser.de/cgit.cgi/iridium-browser/?h=patchview)
* `opensuse/` - Patches from openSUSE's Chromium
* `ubuntu/` - Patches from Ubuntu's Chromium
* `ungoogled-chromium/` - Patches by ungoogled-chromium developers
## Packaging
Packaging is the process of downloading, building, and producing a distributable package of ungoogled-chromium.
Packaging files use the code from this repository to build ungoogled-chromium. Each platform and configuration has an associated packaging repository under the [ungoogled-software](https://github.com/ungoogled-software) organization. For more information about each packaging repository, see the [building documentation](building.md).
Packaging generally consists of the major steps:
1. Download and unpack the source tree
2. Prune binaries
3. Apply patches
4. Substitute domains
5. Build GN via `tools/gn/bootstrap/bootstrap.py`
6. Run `gn gen` with the GN flags
7. Build Chromium via `ninja`
8. Create package(s) of build output (usually in `out/Default`)
-90
View File
@@ -1,90 +0,0 @@
# Development notes and procedures
This document contains an assortment of information for those who want to develop ungoogled-chromium.
Information targeted towards developers *and* other users live in [the Wiki](https://ungoogled-software.github.io/ungoogled-chromium-wiki/).
Contents:
* [Branches](#branches)
* [Adding command-line flags and chrome://flags options](#adding-command-line-flags-and-chromeflags-options)
* [Workflow of updating to a new Chromium version](#workflow-of-updating-to-a-new-chromium-version)
## Branches
Development is focused on `master`, and any changes in there should not break anything unless platforms break during a Chromium version rebase.
Larger feature changes or hotfixes must be done in a separate branch. Once they are ready, then a Pull Request can be made onto `master` (for contributors with write access, merging directly via a git client is fine). After the branch is merged, it should be removed.
## Adding command-line flags and `chrome://flags` options
See `docs/how_to_add_your_feature_flag.md` in the Chromium source tree for the steps needed. Note that updating `tools/metrics/histograms/enums.xml` is not required.
For new flags, first add a constant to `third_party/ungoogled/ungoogled_switches.cc` (by modifying patch `resources/patches/ungoogled-chromium/add-third-party-ungoogled.patch`). Then, use this constant in the steps outlined above.
## Workflow of updating to a new Chromium version
Tested on Debian 10 (buster). Exact instructions should work on any other Linux or macOS system with the proper dependencies.
To gain a deeper understanding of this updating process, have a read through [docs/design.md](design.md).
### Dependencies
* [`quilt`](http://savannah.nongnu.org/projects/quilt)
* This is available in most (if not all) Linux distributions, and also Homebrew on macOS.
* This utility facilitates most of the updating process, so it is important to learn how to use this. The manpage for quilt (as of early 2017) lacks an example of a workflow. There are multiple guides online, but [this guide from Debian](https://wiki.debian.org/UsingQuilt) and [the referenced guide on that page](https://raphaelhertzog.com/2012/08/08/how-to-use-quilt-to-manage-patches-in-debian-packages/) are the ones referenced in developing the current workflow.
* Python 3.9 or newer
* `httplib2` and `six` are also required if you wish to utilize a source clone instead of the source tarball.
### Downloading the source code
```sh
./utils/clone.py -o build/src
```
### Updating lists
The utility `devutils/update_lists.py` automates this process. By default, it will update the files in the local repo. Pass in `-h` or `--help` for available options.
```sh
./devutils/update_lists.py -t build/src
```
The resulting source tree in `build/src` *will not* have binaries pruned or domains substituted.
### Updating patches
**IMPORTANT**: Make sure domain substitution has not been applied before updating patches.
1. Run `source devutils/set_quilt_vars.sh` (or `source devutils/set_quilt_vars.fish` if you are using the fish shell)
* This will setup quilt to modify patches directly in `patches/`
2. Go into the source tree: `cd build/src`
3. Use `quilt` to refresh all patches: `quilt push -a --refresh`
* If an error occurs, go to the next step. Otherwise, skip to Step 5.
4. Use `quilt` to fix the broken patch:
1. Run `quilt push -f`
2. Edit the broken files as necessary by adding (`quilt edit ...` or `quilt add ...`) or removing (`quilt remove ...`) files as necessary
* When removing large chunks of code, remove each line instead of using language features to hide or remove the code. This makes the patches less susceptible to breakages when using quilt's refresh command (e.g. quilt refresh updates the line numbers based on the patch context, so it's possible for new but desirable code in the middle of the block comment to be excluded.). It also helps with readability when someone wants to see the changes made based on the patch alone.
3. Refresh the patch: `quilt refresh`
4. Go back to Step 3.
5. Run `quilt pop -a`
6. Go back to ungoogled-chromium repo: `cd ../..`
7. Run `devutils/validate_config.py`. If any warnings are printed, address them; otherwise, continue to Step 8.
8. Run `devutils/validate_patches.py -l build/src`. If errors occur, go back to Step 3.
This should leave unstaged changes in the git repository to be reviewed, added, and committed.
### Steps for fixing patches after a failed build attempt
If domain substitution is not applied, then the steps from the previous section will work for revising patches.
If domain substitution is applied, then the steps for the initial update will not apply since that would create patches which depend on domain substitution. Here is a method of dealing with this:
1. Revert domain substitution: `./utils/domain_substitution.py revert -c CACHE_PATH_HERE build/src`
2. Follow the patch updating section above
3. Reapply domain substitution: `./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c CACHE_PATH_HERE build/src`
4. Reattempt build. Repeat steps as necessary.
### Next steps
* Submit a Pull Request of these changes to the ungoogled-chromium repo.
* Once the PR is merged, update the repositories of each platform repository that you are maintaining under the `ungoogled-software` organization.
-100
View File
@@ -1,100 +0,0 @@
# List of flags and switches
This is an exhaustive list of command-line switches and flags introduced by ungoogled-chromium.
Each switch has a corresponding entry on the `chrome://flags` page which can be filtered by searching for `ungoogled-chromium`.
If a switch requires a value, you must specify it with an `=` sign; e.g. flag `--foo` with value `bar` should be written as `--foo=bar`.
> **NOTE**: If you add a command-line argument that is also in `chrome://flags`, the flag's state will not be indicated in `chrome://flags`. There is no universal way to ensure command-line flags are taking effect, but you can find if they're being seen by checking `chrome://version`.
- ### Available on all platforms
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--disable-beforeunload` | Disables JavaScript dialog boxes triggered by `beforeunload`
`--disable-grease-tls` | Disables GREASE for TLS. Combined with `--http-accept-header` allows browser to look more like a tor-browser. See https://github.com/ungoogled-software/ungoogled-chromium/issues/783 for more details.
`--disable-search-engine-collection` | Disable automatic search engine scraping from webpages.
`--extension-mime-request-handling` | Change how extension MIME types (CRX and user scripts) are handled. Acceptable values are `download-as-regular-file` or `always-prompt-for-install`. Leave unset to use normal behavior.
`--fingerprinting-canvas-image-data-noise` | (Added flag to Bromite feature) Implements fingerprinting deception for Canvas image data retrieved via JS APIs. In the data, at most 10 pixels are slightly modified.
`--fingerprinting-canvas-measuretext-noise` | (Added flag to Bromite feature) Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization.
`--fingerprinting-client-rects-noise` | (Added flag to Bromite feature) Implements fingerprinting deception of JS APIs `getClientRects()` and `getBoundingClientRect()` by scaling their output values with a random factor in the range -0.0003% to 0.0003%, which are recomputed for every document instantiation.
`--force-punycode-hostnames` | Convert all Internationalized Domain Names to punycode (ASCII representation of Unicode). See https://github.com/ungoogled-software/ungoogled-chromium/issues/370 for more details.
`--hide-crashed-bubble` | Hides the bubble box with the message "Restore Pages? Chromium didn't shut down correctly." that shows on startup after the browser did not exit cleanly.
`--http-accept-header` | Changes the default value of the `Accept` HTTP header sent with HTTP requests. Combined with `--disable-grease-tls` allows browser to look more like a tor-browser. See https://github.com/ungoogled-software/ungoogled-chromium/issues/783 for more details.
`--keep-old-history` | Disables deletion of local browser history after 90 days
`--max-connections-per-host` | (from Bromite) Configure the maximum allowed connections per host. Valid values are `6` and `15`
`--omnibox-autocomplete-filtering` | Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. Accepts `search`, `search-bookmarks`, `search-chrome`, and `search-bookmarks-chrome`.
`--popups-to-tabs` | Makes popups open in new tabs.
- ### Available only on desktop
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--bookmark-bar-ntp` | Sets the visibility of the bookmark bar on the New Tab Page. Only takes the value `never`.
`--close-confirmation` | Show a warning prompt when closing the browser window. Accepts `last` (prompt when closing the last window with several tabs) and `multiple` (prompt only if more than one window is open).
`--close-window-with-last-tab` | Determines whether a window should close once the last tab is closed. Only takes the value `never`.
`--custom-ntp` | Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank` or `chrome://new-tab-page`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page.
`--disable-sharing-hub` | Disables the sharing hub button.
`--enable-incognito-themes` | Allows themes to change the appearance of Incognito windows.
`--hide-extensions-menu` | Hides the extensions container. This includes the puzzle piece icon as well as any pinned extensions.
`--hide-fullscreen-exit-ui` | Hides the "X" that appears when the mouse cursor is moved towards the top of the window in fullscreen mode. Additionally, this hides the "Press F11 to exit full screen" popup.
`--hide-tab-close-buttons` | Hides the close buttons on tabs.
`--remove-grab-handle` | Removes the reserved empty space in the tabstrip for moving the window.
`--remove-tabsearch-button` | Removes the tabsearch button from the tabstrip.
`--scroll-tabs` | Determines if scrolling will cause a switch to a neighboring tab if the cursor hovers over the tabs, or the empty space beside the tabs. The flag requires one the values: `always`, `never`, `incognito-and-guest`. When omitted, the default is to use platform-specific behavior, which is currently enabled only on desktop Linux.
`--show-avatar-button` | Sets visibility of the avatar button. The flag requires one of the values: `always`, `incognito-and-guest` (only show Incognito or Guest modes), or `never`.
`--tab-hover-cards` | Allows removing the tab hover cards or using a tooltip as a replacement. This can be set with the values `none` or `tooltip`.
- #### Available only on Windows
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--disable-encryption` | Disable encryption of cookies, passwords, and settings which uses a generated machine-specific encryption key. This is used to enable portable user data directories.
`--disable-machine-id` | Disables use of a generated machine-specific ID to lock the user data directory to that machine. This is used to enable portable user data directories.
## Feature flags
Feature flags are similar to switches with the difference being that they are passed as values for the `--enable-features` switch. Multiple features can be passed at the same time by separating them with a comma, e.g. `--enable-features=flag1,flag2,flag3`.
These are also available on the `chrome://flags` page.
- ### Available on all platforms
Feature | Description
-- | --
`MinimalReferrers` | Removes all cross-origin referrers and strips same-origin referrers down to the origin. Has lower precedence than `NoCrossOriginReferrers`.
`NoCrossOriginReferrers` | Removes all cross-origin referrers. Has lower precedence than `NoReferrers`.
`NoReferrers` | Removes all referrers.
`ReducedSystemInfo` | Reduces the amount of system information obatainable through headers and javascript, also causes hardwareConcurrency to respond with two cores.
`RemoveClientHints` | Removes client hints (information sent to servers about your system, similar to a user agent).
`SetIpv6ProbeFalse` | Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible.
`SpoofWebGLInfo` | Return generic values for WebGLDebugRendererInfo to remove a potential data leak while preventing potential website breakage.
- ### Available only on desktop
Feature | Description
-- | --
`ClearDataOnExit` | Clears all browsing data on exit.
`DisableLinkDrag` | Prevents dragging of links and selected text. Allows selecting text from a middle of a link. Also allows starting selection without first clearing the existing one. This behaviour is similar to the one from older Opera. See https://github.com/ungoogled-software/ungoogled-chromium/pull/2080 and https://github.com/ungoogled-software/ungoogled-chromium/discussions/2055 for more information.
`DisableQRGenerator` | Disables the QR generator for sharing page links.
## Flags for existing switches
Chromium contains switches that do no have corresponding entries in `chrome://flags`. For convenience, ungoogled-chromium has created entries for some of the commonly-used switches.
- ### Available on all platforms
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--disable-top-sites` | Disables the top sites and most visited entries on the new tab page.
`--disable-webgl` | Disable all versions of WebGL.
`--enable-low-end-device-mode` | Force low-end device mode when set.
`--force-dark-mode` | Forces dark mode in UI for platforms that support it.
`--no-default-browser-check` | Disables the default browser check.
`--no-pings` | Don't send hyperlink auditing pings.
`--webrtc-ip-handling-policy` | Restrict which IP addresses and interfaces WebRTC uses.
- ### Available only on desktop
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--incognito` | Start in Incognito.
`--start-maximized` | Starts the browser maximized, regardless of any previous settings.
-11
View File
@@ -1,11 +0,0 @@
# Supported Platforms
This page lists platforms officially supported by ungoogled-chromium, and their associated repositories.
* Android: [ungoogled-chromium-android](https://github.com/ungoogled-software/ungoogled-chromium-android)
* Arch Linux: [ungoogled-chromium-archlinux](https://github.com/ungoogled-software/ungoogled-chromium-archlinux)
* Debian, Ubuntu, and derivatives: [ungoogled-chromium-debian](https://github.com/ungoogled-software/ungoogled-chromium-debian)
* Fedora and CentOS: [ungoogled-chromium-fedora](https://github.com/ungoogled-software/ungoogled-chromium-fedora)
* Portable Linux (for any Linux distro): [ungoogled-chromium-portablelinux](https://github.com/ungoogled-software/ungoogled-chromium-portablelinux)
* Windows: [ungoogled-chromium-windows](https://github.com/ungoogled-software/ungoogled-chromium-windows)
* macOS: [ungoogled-chromium-macos](https://github.com/ungoogled-software/ungoogled-chromium-macos)
-56
View File
@@ -1,56 +0,0 @@
# Platform Repository Standards and Guidelines
*This document is new, and its structure and content may change. If you have suggestions, please create an issue!*
ungoogled-chromium is comprised of anonymous developers who volunteer their efforts. Some of these developers may choose to provide long-term support for [an officially-supported platform](platforms.md), or bring support to a new platform. For such developers, this document consists of standards and management guidelines for platform repos.
We will refer to this git repository as "the main repo", and refer to repositories that add platform-specific code to build ungoogled-chromium as "platform repos". An "officially-supported platform" is a platform with a platform repo in [the ungoogled-software organization](https://github.com/ungoogled-software) and noted in [docs/platforms.md](platforms.md).
## Standards
An officially-supported platform repo:
* Must not modify or remove existing patches, GN flags, domain substitution, or binary pruning in the main repo. Instead, you can add new patches or add more files/rules to domain substitution or binary pruning. (If you think a change is needed in the main repo, please make an issue!)
* Must have a tagging/versioning scheme that includes the ungoogled-chromium version.
* Must not require an Internet connection during compilation (before compilation is OK).
* Should allow the user to download all build requirements before building.
* Must not require external services to build, aside from repos in the ungoogled-software organization and repos provided by or used by Chromium.
* Should have a reproducible build for all versions (currently, there is no formal process to enforce/verify reproducibility of binaries)
Each deviation must be clearly noted in the platform repo's documentation (such as the repo's README), and have an associated issue in the platform repo.
## Teams in the ungoogled-software organization
Each officially-supported platform has one or more teams in the ungoogled-software organization. These teams provide additional means for collaborating with other developers, such as issue triaging and private discussions (see section "How to communicate" below).
If you are a regular contributor and would like to provide long-term support for a platform, you can request to be included in the ungoogled-software organization team for your platform. Since the number of developers is low, there is no formal process to do this; just ask in an issue.
## How to communicate
In the interest of transparency, it is recommended to discuss work in public spaces like issues or PRs. If a discussion should not involve outsiders, you can lock the issue or PR to collaborators only.
You must use team discussions if you are discussing or sharing information that can affect the security of the repository. Otherwise, you may use team discussions at your discretion.
## Issues
Each platform repo should have a team in ungoogled-software with the Triage permission level. All members should feel free to manage issues.
TODO: More details?
## Pull Requests
TODO
## Repository Settings and Shared Resources
Shared resources includes:
* CI services like CirrusCI, GitHub Actions, etc.
* Build services like OpenSUSE Build Service (OBS)
These need to be handled with care, as they can cause a wide variety of issues from security and privacy leaks all the way to data loss.
There are several ways to handle shared resources:
* Assign one person to manage a certain set of settings (i.e. grant them "ownership" of those settings). If you want to change a setting, you should request a change in a team discussion.
* TODO: More ways to manage settings?
+1 -1
View File
@@ -2,7 +2,7 @@ fonts(\\*?)\.googleapis(\\*?)\.com#f0ntz\g<1>.9oo91e8p1\g<2>.qjz9zk
google([A-Za-z\-]*?\\*?)\.com(?!mon)#9oo91e\g<1>.qjz9zk
gstatic([A-Za-z\-]*?\\*?)\.com#95tat1c\g<1>.qjz9zk
chrome([A-Za-z\-]*?\\*?)\.com(?!ponent)#ch40me\g<1>.qjz9zk
chromium([A-Za-z\-]*?\\*?)\.org#ch40m1um\g<1>.qjz9zk
chromium(?!app)([A-Za-z\-]*?\\*?)\.org#ch40m1um\g<1>.qjz9zk
mozilla([A-Za-z\-]*?\\*?)\.org#m0z111a\g<1>.qjz9zk
facebook([A-Za-z\-]*?\\*?)\.com#f8c3b00k\g<1>.qjz9zk
appspot([A-Za-z\-]*?\\*?)\.com#8pp2p8t\g<1>.qjz9zk
+2722 -984
View File
File diff suppressed because it is too large Load Diff
-12
View File
@@ -1,12 +0,0 @@
[icons]
url = https://gist.githubusercontent.com/dumbmoron/a8aeb8926c4baa8fdd0fa8e8de47e5eb/raw/b5aae9abdceb64661afcf3dc2712523f8e3b1952/icons.tar.gz
download_filename = icons.tar.gz
sha256 = cd954c7257f126be871f79ecf8fff143425708d5d33501d0ba870fa466dafbe7
output_path = ./components/resources/default_100_percent/search_engine_choice
[onboarding]
version = 202505031903
url = https://github.com/imputnet/helium-onboarding/releases/download/%(version)s/helium-onboarding-%(version)s.tar.gz
download_filename = onboarding-page-%(version)s.tar.gz
sha256 = a8f2ba7665b98191ef343f0134fadea4d73c5954bbc4d2413d10c8fb5e9f8f4c
output_path = ./components/helium_onboarding
-2
View File
@@ -4,8 +4,6 @@ clang_use_chrome_plugins=false
disable_fieldtrial_testing_config=true
enable_hangout_services_extension=false
enable_mdns=false
enable_nacl=false
enable_reading_list=false
enable_remoting=false
enable_reporting=false
enable_service_discovery=false
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace {
#if BUILDFLAG(IS_WIN)
@@ -164,20 +166,30 @@ std::vector<importer::SourceProfile> Det
@@ -171,20 +173,30 @@ std::vector<user_data_importer::SourcePr
if (shell_integration::IsFirefoxDefaultBrowser()) {
DetectFirefoxProfiles(locale, &profiles);
DetectBuiltinWindowsProfiles(&profiles);
@@ -65,15 +65,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ }
#endif
if (include_interactive_profiles) {
importer::SourceProfile bookmarks_profile;
@@ -227,5 +239,11 @@ void ImporterList::SourceProfilesLoaded(
user_data_importer::SourceProfile bookmarks_profile;
@@ -234,5 +246,11 @@ void ImporterList::SourceProfilesLoaded(
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
source_profiles_.assign(profiles.begin(), profiles.end());
+
+ for (auto& profile : source_profiles_) {
+ if (profile.services_supported & importer::PASSWORDS)
+ profile.services_supported ^= importer::PASSWORDS;
+ if (profile.services_supported & user_data_importer::PASSWORDS)
+ profile.services_supported ^= user_data_importer::PASSWORDS;
+ }
+
std::move(profiles_loaded_callback).Run();
@@ -97,19 +97,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
public_deps = [
"//mojo/public/mojom/base",
@@ -81,6 +85,9 @@ source_set("importer") {
@@ -82,19 +86,28 @@ source_set("importer") {
sources = [
"firefox_importer_utils.cc",
"firefox_importer_utils.h",
+ "chrome_importer_constants.h",
+ "chrome_importer_utils.cc",
+ "chrome_importer_utils.h",
"imported_bookmark_entry.cc",
"imported_bookmark_entry.h",
"importer_autofill_form_data_entry.cc",
@@ -93,14 +100,20 @@ source_set("importer") {
"importer_url_row.cc",
"importer_url_row.h",
"importer_autofill_form_data_entry.h",
"importer_bridge.cc",
"importer_bridge.h",
"pstore_declarations.h",
+ "scoped_copy_file.cc",
+ "scoped_copy_file.h",
@@ -130,7 +128,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
]
} else if (is_win) {
sources += [
@@ -111,6 +124,7 @@ source_set("importer") {
@@ -105,6 +118,7 @@ source_set("importer") {
"ie_importer_utils_win.h",
"importer_test_registry_overrider_win.cc",
"importer_test_registry_overrider_win.h",
@@ -138,10 +136,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
]
}
deps = [
@@ -118,8 +132,17 @@ source_set("importer") {
"//chrome/app:generated_resources",
@@ -113,10 +127,19 @@ source_set("importer") {
"//chrome/common:ini_parser",
"//components/favicon_base",
"//components/user_data_importer/common",
+ "//components/webdata/common",
"//content/public/common",
+ "//extensions/buildflags",
@@ -156,9 +154,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ]
+ }
}
--- a/chrome/common/importer/importer_type.h
+++ b/chrome/common/importer/importer_type.h
@@ -28,6 +28,14 @@ enum ImporterType {
if (!is_android) {
--- a/components/user_data_importer/common/importer_type.h
+++ b/components/user_data_importer/common/importer_type.h
@@ -28,6 +28,16 @@ enum ImporterType {
#if BUILDFLAG(IS_WIN)
TYPE_EDGE = 6,
#endif
@@ -170,92 +170,93 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ TYPE_WHALE = 69,
+ TYPE_ARC = 70,
+ TYPE_BRAVE = 71,
+ TYPE_DIA = 72,
+ TYPE_PERPLEXITY_COMET = 73,
};
} // namespace importer
} // namespace user_data_importer
--- a/tools/metrics/histograms/metadata/sql/histograms.xml
+++ b/tools/metrics/histograms/metadata/sql/histograms.xml
@@ -38,6 +38,7 @@ chromium-metrics-reviews@google.com.
<variant name="DataSharingGroupStorage" summary="DataSharingGroupStorage"/>
@@ -49,6 +49,7 @@ chromium-metrics-reviews@google.com.
<variant name="DBSCSessions" summary="DBSCSessions"/>
<variant name="DIPS" summary="DIPS"/>
<variant name="DownloadRecord" summary="DownloadRecord"/>
+ <variant name="Favicons" summary="Favicons"/>
<variant name="FileIndexService" summary="FileIndexService"/>
<variant name="FirefoxImporter" summary="FirefoxImporter"/>
<variant name="FirstPartySets" summary="FirstPartySets"/>
--- a/chrome/common/importer/importer_data_types.h
+++ b/chrome/common/importer/importer_data_types.h
--- a/components/user_data_importer/common/importer_data_types.h
+++ b/components/user_data_importer/common/importer_data_types.h
@@ -29,7 +29,8 @@ enum ImportItem {
SEARCH_ENGINES = 1 << 4,
HOME_PAGE = 1 << 5,
SEARCH_ENGINES = 1 << 4,
HOME_PAGE = 1 << 5,
AUTOFILL_FORM_DATA = 1 << 6,
- ALL = (1 << 7) - 1 // All the bits should be 1, hence the -1.
+ EXTENSIONS = 1 << 7,
+ ALL = (1 << 8) - 1 // All the bits should be 1, hence the -1.
- ALL = (1 << 7) - 1 // All the bits should be 1, hence the -1.
+ EXTENSIONS = 1 << 7,
+ ALL = (1 << 8) - 1 // All the bits should be 1, hence the -1.
};
// Information about a profile needed by an importer to do import work.
@@ -109,6 +110,7 @@ enum VisitSource {
@@ -111,6 +112,7 @@ enum VisitSource {
VISIT_SOURCE_FIREFOX_IMPORTED = 1,
VISIT_SOURCE_IE_IMPORTED = 2,
VISIT_SOURCE_SAFARI_IMPORTED = 3,
+ VISIT_SOURCE_CHROME_IMPORTED = 4,
};
} // namespace importer
} // namespace user_data_importer
--- a/chrome/common/importer/profile_import_process_param_traits_macros.h
+++ b/chrome/common/importer/profile_import_process_param_traits_macros.h
@@ -20,11 +20,11 @@
@@ -23,11 +23,11 @@
#if BUILDFLAG(IS_WIN)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
importer::TYPE_UNKNOWN,
- importer::TYPE_EDGE)
+ importer::TYPE_BRAVE)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
user_data_importer::TYPE_UNKNOWN,
- user_data_importer::TYPE_EDGE)
+ user_data_importer::TYPE_PERPLEXITY_COMET)
#else
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
importer::TYPE_UNKNOWN,
- importer::TYPE_BOOKMARKS_FILE)
+ importer::TYPE_BRAVE)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
user_data_importer::TYPE_UNKNOWN,
- user_data_importer::TYPE_BOOKMARKS_FILE)
+ user_data_importer::TYPE_PERPLEXITY_COMET)
#endif
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImportItem,
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImportItem,
--- a/chrome/browser/ui/webui/settings/import_data_handler.cc
+++ b/chrome/browser/ui/webui/settings/import_data_handler.cc
@@ -146,6 +146,9 @@ void ImportDataHandler::HandleImportData
if (*type_dict.FindBool(prefs::kImportDialogSearchEngine)) {
selected_items |= importer::SEARCH_ENGINES;
selected_items |= user_data_importer::SEARCH_ENGINES;
}
+ if (*type_dict.FindBool(prefs::kImportDialogExtensions)) {
+ selected_items |= importer::EXTENSIONS;
+ selected_items |= user_data_importer::EXTENSIONS;
+ }
const importer::SourceProfile& source_profile =
const user_data_importer::SourceProfile& source_profile =
importer_list_->GetSourceProfileAt(browser_index);
@@ -223,6 +226,8 @@ void ImportDataHandler::SendBrowserProfi
(browser_services & importer::SEARCH_ENGINES) != 0);
browser_profile.Set("autofillFormData",
(browser_services & importer::AUTOFILL_FORM_DATA) != 0);
@@ -225,6 +228,8 @@ void ImportDataHandler::SendBrowserProfi
browser_profile.Set(
"autofillFormData",
(browser_services & user_data_importer::AUTOFILL_FORM_DATA) != 0);
+ browser_profile.Set("extensions",
+ (browser_services & importer::EXTENSIONS) != 0);
+ (browser_services & user_data_importer::EXTENSIONS) != 0);
browser_profiles.Append(std::move(browser_profile));
}
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -4231,6 +4231,10 @@ inline constexpr char kServiceWorkerToCo
// is set as a SharedWorker script URL.
@@ -4290,6 +4290,9 @@ inline constexpr char kServiceWorkerToCo
inline constexpr char kSharedWorkerBlobURLFixEnabled[] =
"worker.shared_worker_blob_url_fix_enabled";
+
+inline constexpr char kImportDialogExtensions[] =
+ "import_dialog_extensions";
+
} // namespace prefs
#endif // CHROME_COMMON_PREF_NAMES_H_
// Boolean indicating whether clearing window.name when the navigation is
// top-level, cross-site and swaps BrowsingContextGroup is allowed or not.
inline constexpr char kClearWindowNameForNewBrowsingContextGroup[] =
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -1148,6 +1148,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;
@@ -266,15 +267,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
@@ -62,6 +62,7 @@
#include "chrome/browser/ui/webui/settings/font_handler.h"
#include "chrome/browser/ui/webui/settings/hats_handler.h"
#include "chrome/browser/ui/webui/settings/import_data_handler.h"
@@ -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"
+#include "chrome/browser/ui/webui/settings/brave_import_data_handler.h"
#include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h"
#include "chrome/browser/ui/webui/settings/on_startup_handler.h"
#include "chrome/browser/ui/webui/settings/password_manager_handler.h"
@@ -207,6 +208,7 @@ void SettingsUI::RegisterProfilePrefs(
#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"
@@ -210,6 +211,7 @@ void SettingsUI::RegisterProfilePrefs(
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
registry->RegisterBooleanPref(prefs::kImportDialogSearchEngine, true);
@@ -282,7 +283,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
SettingsUI::SettingsUI(content::WebUI* web_ui)
@@ -251,7 +253,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));
@@ -293,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
@@ -849,6 +849,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},
@@ -318,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
@@ -1524,6 +1524,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",
@@ -329,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",
@@ -1679,6 +1683,13 @@ static_library("ui") {
@@ -1415,6 +1419,13 @@ static_library("ui") {
]
}
@@ -342,17 +343,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Non-android deps for "ui" target.
deps += [
"//base",
":browser_tab_strip",
--- a/chrome/browser/ui/webui/settings/import_data_handler.h
+++ b/chrome/browser/ui/webui/settings/import_data_handler.h
@@ -38,7 +38,9 @@ class ImportDataHandler : public Setting
@@ -36,9 +36,9 @@ class ImportDataHandler : public Setting
void RegisterMessages() override;
void OnJavascriptAllowed() override {}
void OnJavascriptDisallowed() override;
private:
- void StartImport(const importer::SourceProfile& source_profile,
-
+ friend class BraveImportDataHandler;
+ private:
+ virtual void StartImport(const importer::SourceProfile& source_profile,
private:
- void StartImport(const user_data_importer::SourceProfile& source_profile,
+ virtual void StartImport(const user_data_importer::SourceProfile& source_profile,
uint16_t imported_items);
// Handler for the "importData" message. First argument is the selected
@@ -369,7 +371,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"external_process_importer_client.h",
"external_process_importer_host.h",
"firefox_profile_lock.h",
@@ -36,6 +40,10 @@ source_set("impl") {
@@ -37,6 +41,10 @@ source_set("impl") {
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
sources = [
@@ -382,34 +384,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"firefox_profile_lock.cc",
--- a/chrome/browser/importer/external_process_importer_host.h
+++ b/chrome/browser/importer/external_process_importer_host.h
@@ -78,8 +78,9 @@ class ExternalProcessImporterHost
@@ -79,8 +79,13 @@ class ExternalProcessImporterHost
void NotifyImportStarted();
void NotifyImportItemStarted(importer::ImportItem item);
void NotifyImportItemEnded(importer::ImportItem item);
void NotifyImportItemStarted(user_data_importer::ImportItem item);
void NotifyImportItemEnded(user_data_importer::ImportItem item);
- void NotifyImportEnded();
+ void virtual NotifyImportEnded();
+ friend class BraveExternalProcessImporterHost;
+ void set_parent_view(gfx::NativeView parent_view) {
+ parent_view_ = parent_view;
+ }
+ gfx::NativeView parent_view_ = gfx::NativeView();
private:
// ExternalProcessImporterHost deletes itself in OnImportEnded().
~ExternalProcessImporterHost() override;
--- a/components/history/core/browser/history_types.h
+++ b/components/history/core/browser/history_types.h
@@ -54,6 +54,8 @@ enum VisitSource {
SOURCE_FIREFOX_IMPORTED = 3,
SOURCE_IE_IMPORTED = 4,
@@ -55,6 +55,8 @@ enum VisitSource {
SOURCE_SAFARI_IMPORTED = 5,
+ SOURCE_CHROME_IMPORTED = 6,
+ SOURCE_BRAVE_IMPORTED = 7,
SOURCE_ACTOR = 6,
SOURCE_OS_MIGRATION_IMPORTED = 7,
+ SOURCE_CHROME_IMPORTED = 8,
+ SOURCE_BRAVE_IMPORTED = 9,
};
// Corresponds to the "id" column of the "visits" SQL table.
--- a/components/history/core/browser/visit_database.cc
+++ b/components/history/core/browser/visit_database.cc
@@ -118,6 +118,8 @@ VisitSource VisitSourceFromInt(int value
case SOURCE_FIREFOX_IMPORTED:
case SOURCE_IE_IMPORTED:
@@ -123,6 +123,8 @@ VisitSource VisitSourceFromInt(int value
case SOURCE_SAFARI_IMPORTED:
case SOURCE_ACTOR:
case SOURCE_OS_MIGRATION_IMPORTED:
+ case SOURCE_CHROME_IMPORTED:
+ case SOURCE_BRAVE_IMPORTED:
return converted;
@@ -417,19 +423,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// In cases of database corruption, SOURCE_BROWSED is a safe default value.
--- a/chrome/browser/importer/in_process_importer_bridge.cc
+++ b/chrome/browser/importer/in_process_importer_bridge.cc
@@ -53,6 +53,8 @@ history::VisitSource ConvertImporterVisi
@@ -52,6 +52,8 @@ history::VisitSource ConvertImporterVisi
return history::SOURCE_IE_IMPORTED;
case importer::VISIT_SOURCE_SAFARI_IMPORTED:
case user_data_importer::VISIT_SOURCE_SAFARI_IMPORTED:
return history::SOURCE_SAFARI_IMPORTED;
+ case importer::VISIT_SOURCE_CHROME_IMPORTED:
+ case user_data_importer::VISIT_SOURCE_CHROME_IMPORTED:
+ return history::SOURCE_CHROME_IMPORTED;
}
NOTREACHED();
}
--- a/chrome/utility/BUILD.gn
+++ b/chrome/utility/BUILD.gn
@@ -92,6 +92,12 @@ static_library("utility") {
"importer/bookmark_html_reader.h",
@@ -90,6 +90,12 @@ static_library("utility") {
sources += [
"importer/bookmarks_file_importer.cc",
"importer/bookmarks_file_importer.h",
+ "importer/brave_external_process_importer_bridge.cc",
@@ -440,20 +446,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ "importer/chrome_importer.h",
"importer/external_process_importer_bridge.cc",
"importer/external_process_importer_bridge.h",
"importer/favicon_reencode.cc",
"importer/importer.cc",
--- a/chrome/utility/services.cc
+++ b/chrome/utility/services.cc
@@ -54,7 +54,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/passage_embeddings/passage_embeddings_service.h"
#include "services/proxy_resolver/proxy_resolver_factory_impl.h" // nogncheck
@@ -144,6 +146,13 @@ static_assert(BUILDFLAG(ENABLE_PRINTING)
@@ -137,6 +139,13 @@ static_assert(BUILDFLAG(ENABLE_PRINTING)
namespace {
@@ -467,17 +473,17 @@ 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));
}
@@ -454,6 +463,7 @@ void RegisterMainThreadServices(mojo::Se
services.Add(RunCSVPasswordParser);
@@ -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);
services.Add(RunPassageEmbeddingsService);
--- a/chrome/utility/importer/external_process_importer_bridge.h
+++ b/chrome/utility/importer/external_process_importer_bridge.h
@@ -69,7 +69,7 @@ class ExternalProcessImporterBridge : pu
@@ -72,7 +72,7 @@ class ExternalProcessImporterBridge : pu
std::u16string GetLocalizedString(int message_id) override;
// End ImporterBridge implementation.
@@ -513,7 +519,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
--- a/chrome/browser/importer/in_process_importer_bridge.h
+++ b/chrome/browser/importer/in_process_importer_bridge.h
@@ -57,7 +57,7 @@ class InProcessImporterBridge : public I
@@ -59,7 +59,7 @@ class InProcessImporterBridge : public I
std::u16string GetLocalizedString(int message_id) override;
// End ImporterBridge implementation.
@@ -527,13 +533,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -35,6 +35,7 @@ enum ImporterTypeMetrics {
void LogImporterUseToMetrics(const std::string& metric_postfix,
ImporterType type) {
user_data_importer::ImporterType type) {
+ return;
ImporterTypeMetrics metrics_type = IMPORTER_METRICS_UNKNOWN;
switch (type) {
case TYPE_UNKNOWN:
case user_data_importer::TYPE_UNKNOWN:
@@ -59,6 +60,9 @@ void LogImporterUseToMetrics(const std::
case TYPE_BOOKMARKS_FILE:
case user_data_importer::TYPE_BOOKMARKS_FILE:
metrics_type = IMPORTER_METRICS_BOOKMARKS_FILE;
break;
+ default:
@@ -544,7 +550,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Note: This leaks memory, which is the expected behavior as the factory
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -51,10 +51,10 @@ class ExternalProcessImporterClient
@@ -48,10 +48,10 @@ class ExternalProcessImporterClient
const ExternalProcessImporterClient&) = delete;
// Launches the task to start the external process.
@@ -557,7 +563,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// chrome::mojom::ProfileImportObserver:
void OnImportStart() override;
@@ -84,6 +84,8 @@ class ExternalProcessImporterClient
@@ -82,6 +82,8 @@ class ExternalProcessImporterClient
const std::vector<ImporterAutofillFormDataEntry>&
autofill_form_data_entry_group) override;
@@ -566,7 +572,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
protected:
~ExternalProcessImporterClient() override;
@@ -99,7 +101,7 @@ class ExternalProcessImporterClient
@@ -97,7 +99,7 @@ class ExternalProcessImporterClient
// The Mojo connections need to be torn down on the same thread that created
// them, but the destructor is not guaranteed to be run on that thread so we
// tear down the connections explicitly.
@@ -575,3 +581,89 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// These variables store data being collected from the importer until the
// 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
@@ -11478,6 +11478,15 @@ Check your passwords anytime in <ph name
Microsoft Edge
</message>
</if>
+ <message name="IDS_IMPORTED_FROM_BOOKMARK_FOLDER" desc="Name for bookmark panel folder imported from another browser">
+ Imported from <ph name="BROWSER_NAME">$1<ex>Chrome</ex></ph>
+ </message>
+ <message name="IDS_EXTENSIONS_IMPORTER_LOCK_TITLE" desc="Dialog title for importer lock dialog">
+ Import profile still in use
+ </message>
+ <message name="IDS_EXTENSIONS_IMPORTER_LOCK_TEXT" desc="The message to be displayed in the importer-lock dialog">
+ To continue importing data, first close the browser you're importing from.
+ </message>
<message name="IDS_IMPORT_FROM_FIREFOX" desc="browser combo box: Mozilla Firefox">
Mozilla Firefox
</message>
--- a/chrome/browser/importer/importer_lock_dialog.h
+++ b/chrome/browser/importer/importer_lock_dialog.h
@@ -21,6 +21,11 @@ void ShowImportLockDialog(gfx::NativeWin
base::OnceCallback<void(bool)> callback,
int importer_lock_title_id = IDS_IMPORTER_LOCK_TITLE,
int importer_lock_text_id = IDS_IMPORTER_LOCK_TEXT);
+void ShowImportLockDialog(gfx::NativeView parent_view,
+ gfx::NativeWindow parent,
+ base::OnceCallback<void(bool)> callback,
+ int importer_lock_title_id = IDS_IMPORTER_LOCK_TITLE,
+ int importer_lock_text_id = IDS_IMPORTER_LOCK_TEXT);
} // namespace importer
--- a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
+++ b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
@@ -27,8 +27,36 @@ void ShowImportLockDialog(gfx::NativeWin
importer_lock_title_id, importer_lock_text_id);
}
+void ShowImportLockDialog(gfx::NativeView parent_view,
+ gfx::NativeWindow parent,
+ base::OnceCallback<void(bool)> callback,
+ int importer_lock_title_id,
+ int importer_lock_text_id) {
+ ImportLockDialogView::Show(parent_view, parent, std::move(callback),
+ importer_lock_title_id, importer_lock_text_id);
+}
+
} // namespace importer
+
+// static
+void ImportLockDialogView::Show(gfx::NativeView parent_view,
+ gfx::NativeWindow parent,
+ base::OnceCallback<void(bool)> callback,
+ int importer_lock_title_id,
+ int importer_lock_text_id) {
+ views::DialogDelegate::CreateDialogWidget(
+ new ImportLockDialogView(std::move(callback), importer_lock_title_id,
+ importer_lock_text_id),
+ parent, parent_view)
+ ->Show();
+ base::RecordAction(UserMetricsAction("ImportLockDialogView_Shown"));
+}
+
+ui::mojom::ModalType ImportLockDialogView::GetModalType() const {
+ return ui::mojom::ModalType::kChild;
+}
+
// static
void ImportLockDialogView::Show(gfx::NativeWindow parent,
base::OnceCallback<void(bool)> callback,
--- a/chrome/browser/ui/views/importer/import_lock_dialog_view.h
+++ b/chrome/browser/ui/views/importer/import_lock_dialog_view.h
@@ -23,6 +23,12 @@ class ImportLockDialogView : public view
base::OnceCallback<void(bool)> callback,
int importer_lock_title_id = IDS_IMPORTER_LOCK_TITLE,
int importer_lock_text_id = IDS_IMPORTER_LOCK_TEXT);
+ static void Show(gfx::NativeView parent_view,
+ gfx::NativeWindow parent,
+ base::OnceCallback<void(bool)> callback,
+ int importer_lock_title_id = IDS_IMPORTER_LOCK_TITLE,
+ int importer_lock_text_id = IDS_IMPORTER_LOCK_TEXT);
+ ui::mojom::ModalType GetModalType() const override;
private:
ImportLockDialogView(base::OnceCallback<void(bool)> callback,
@@ -0,0 +1,58 @@
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.
Copyright (c) 2025, The Brave Authors
Copyright (c) 2025, The Helium Authors
Alternatively, the contents of this file may be used under the terms
of the GNU General Public License Version 3, as described below:
Copyright (C) 2025 The Helium Authors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -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"
+#include "extensions/browser/api/content_settings/content_settings_service.h"
#include "extensions/browser/blocklist_extension_prefs.h"
#include "extensions/browser/delayed_install_manager.h"
#include "extensions/browser/disable_reason.h"
@@ -550,6 +551,22 @@ void ExtensionRegistrar::AddComponentExt
}
AddExtension(extension);
+
+ if (!IsExtensionEnabled(extension->id()))
+ return;
+
+ // ContentSettingsStore::RegisterExtension is only called for default
+ // components on the first run with a fresh profile. All restarts of the
+ // browser after that do not call it. This causes ContentSettingsStore's
+ // `entries_` to never insert the component ID and then
+ // ContentSettingsStore::GetValueMap always returns nullptr. I don't think
+ // Chromium is affected by this simply because they don't use content settings
+ // from default component extensions.
+ extension_prefs_->OnExtensionInstalled(
+ extension, /*disable_reasons=*/{}, syncer::StringOrdinal(),
+ extensions::kInstallFlagNone, std::string(), {} /* ruleset_checksums */);
+ extensions::ContentSettingsService::Get(browser_context_)
+ ->OnExtensionPrefsLoaded(extension->id(), extension_prefs_);
}
void ExtensionRegistrar::RemoveComponentExtension(
+260
View File
@@ -0,0 +1,260 @@
Based on Brave's MRU tab cycling implementation, adapted for Helium.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.
Copyright (c) 2025, The Brave Authors
Copyright (c) 2025, The Helium Authors
Alternatively, the contents of this file may be used under the terms
of the GNU General Public License Version 3, as described below:
Copyright (C) 2025 The Helium Authors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -54,6 +54,7 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/commerce/ui_utils.h"
#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h"
#include "chrome/browser/ui/tabs/features.h"
@@ -4035,6 +4036,44 @@ TabStripSelectionChange TabStripModel::S
return selection;
}
+void TabStripModel::SelectMRUTab(TabRelativeDirection direction,
+ TabStripUserGestureDetails detail) {
+ if (mru_cycle_list_.empty()) {
+ Browser* browser = chrome::FindBrowserWithTab(GetWebContentsAt(0));
+ if (!browser) {
+ return;
+ }
+
+ for (int i = 0; i < count(); ++i) {
+ mru_cycle_list_.push_back(i);
+ }
+
+ std::sort(mru_cycle_list_.begin(), mru_cycle_list_.end(),
+ [this](int a, int b) {
+ return GetWebContentsAt(a)->GetLastActiveTimeTicks() >
+ GetWebContentsAt(b)->GetLastActiveTimeTicks();
+ });
+
+ if (BrowserView* browser_view = browser->window()->AsBrowserView()) {
+ browser_view->StartTabCycling();
+ }
+ }
+
+ if (direction == TabRelativeDirection::kNext) {
+ std::rotate(mru_cycle_list_.begin(), mru_cycle_list_.begin() + 1,
+ mru_cycle_list_.end());
+ } else {
+ std::rotate(mru_cycle_list_.rbegin(), mru_cycle_list_.rbegin() + 1,
+ mru_cycle_list_.rend());
+ }
+
+ ActivateTabAt(mru_cycle_list_[0], detail);
+}
+
+void TabStripModel::StopMRUCycling() {
+ mru_cycle_list_.clear();
+}
+
void TabStripModel::SelectRelativeTab(TabRelativeDirection direction,
TabStripUserGestureDetails detail) {
// This may happen during automated testing or if a user somehow buffers
--- a/chrome/browser/ui/tabs/tab_strip_model.h
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -617,6 +617,10 @@ class TabStripModel {
TabStripUserGestureDetails detail = TabStripUserGestureDetails(
TabStripUserGestureDetails::GestureType::kOther));
+ // Stops cycling through tabs in MRU order when Ctrl is released.
+ // Used in BrowserView::StopTabCycling().
+ void StopMRUCycling();
+
// Moves the active in the specified direction. Respects group boundaries.
void MoveTabNext();
void MoveTabPrevious();
@@ -1183,6 +1187,11 @@ class TabStripModel {
kPrevious,
};
+ // Selects either the most recently used tab
+ // or the least recently used tab.
+ void SelectMRUTab(TabRelativeDirection direction,
+ TabStripUserGestureDetails detail);
+
// Selects either the next tab (kNext), or the previous tab (kPrevious).
void SelectRelativeTab(TabRelativeDirection direction,
TabStripUserGestureDetails detail);
@@ -1462,6 +1471,9 @@ class TabStripModel {
// The focused group. If no group is focused, this is nullopt.
std::optional<tab_groups::TabGroupId> focused_group_;
+ // List of tabs for MRU cycling
+ std::vector<int> mru_cycle_list_;
+
base::WeakPtrFactory<TabStripModel> weak_factory_{this};
};
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -303,7 +303,10 @@
#include "ui/compositor/paint_recorder.h"
#include "ui/content_accelerators/accelerator_util.h"
#include "ui/display/screen.h"
+#include "ui/events/event.h"
+#include "ui/events/event_handler.h"
#include "ui/events/event_utils.h"
+#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/animation/animation_runner.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
@@ -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"
+#include "ui/views/event_monitor.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
@@ -822,6 +826,83 @@ class BrowserView::ExclusiveAccessContex
base::WeakPtrFactory<ExclusiveAccessContextImpl> weak_ptr_factory_{this};
};
+// Handles events during MRU tab cycling to start/stop tab cycling.
+class TabCyclingEventHandler : public ui::EventObserver,
+ public views::WidgetObserver {
+ public:
+ explicit TabCyclingEventHandler(BrowserView* browser_view)
+ : browser_view_(browser_view) {
+ Start();
+ }
+
+ ~TabCyclingEventHandler() override { Stop(); }
+
+ TabCyclingEventHandler(const TabCyclingEventHandler&) = delete;
+ TabCyclingEventHandler& operator=(const TabCyclingEventHandler&) = delete;
+
+ private:
+ // ui::EventObserver overrides:
+ void OnEvent(const ui::Event& event) override {
+ if (event.type() == ui::EventType::kKeyReleased &&
+ event.AsKeyEvent()->key_code() == ui::VKEY_CONTROL) {
+ // Ctrl key was released, stop the tab cycling.
+ Stop();
+ return;
+ }
+
+ if (event.type() == ui::EventType::kMousePressed) {
+ Stop();
+ }
+ }
+
+ // views::WidgetObserver overrides:
+ void OnWidgetActivationChanged(views::Widget* widget, bool active) override {
+ // We should stop cycling if other application gets active state.
+ if (!active) {
+ Stop();
+ }
+ }
+
+ // Handle browser widget closing while tab cycling is in-progress.
+ void OnWidgetClosing(views::Widget* widget) override { Stop(); }
+
+ void Start() {
+ // Add the event handler.
+ auto* widget = browser_view_->GetWidget();
+ if (widget->GetNativeWindow()) {
+ monitor_ = views::EventMonitor::CreateWindowMonitor(
+ this, widget->GetNativeWindow(),
+ {ui::EventType::kMousePressed, ui::EventType::kKeyReleased});
+ }
+ widget->AddObserver(this);
+ }
+
+ void Stop() {
+ if (!monitor_) {
+ // Already stopped.
+ return;
+ }
+
+ // Remove event handler.
+ auto* widget = browser_view_->GetWidget();
+ monitor_.reset();
+ widget->RemoveObserver(this);
+ browser_view_->StopTabCycling();
+ }
+
+ raw_ptr<BrowserView> browser_view_;
+ std::unique_ptr<views::EventMonitor> monitor_;
+};
+
+void BrowserView::StartTabCycling() {
+ tab_cycling_event_handler_ = std::make_unique<TabCyclingEventHandler>(this);
+}
+
+void BrowserView::StopTabCycling() {
+ tab_cycling_event_handler_.reset();
+ browser()->tab_strip_model()->StopMRUCycling();
+}
+
class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
public:
explicit AccessibilityModeObserver(BrowserView* browser_view)
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -85,6 +85,7 @@ class MultiContentsView;
class ProjectsPanelView;
class ScrimView;
class SidePanel;
+class TabCyclingEventHandler;
class TabDragTarget;
class TabSearchBubbleHost;
class TabStrip;
@@ -583,6 +584,10 @@ class BrowserView : public BrowserWindow
bool IsBorderlessModeEnabled() const override;
void ShowChromeLabs() override;
BrowserView* AsBrowserView() override;
+
+ void StartTabCycling();
+ void StopTabCycling();
+
SharingDialog* ShowSharingDialog(content::WebContents* contents,
SharingDialogData data) override;
void ShowUpdateChromeDialog() override;
@@ -884,6 +889,7 @@ class BrowserView : public BrowserWindow
friend class BrowserViewLayoutDelegateImpl;
friend class BrowserViewLayoutDelegateImplOld;
friend class BrowserViewLayoutDelegateImplBrowsertest;
+ friend class TabCyclingEventHandler;
friend class TopControlsSlideControllerTest;
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, AccessibleWindowTitle);
@@ -1451,6 +1457,8 @@ class BrowserView : public BrowserWindow
TabStripAndWebAppViewsReparentedState::kMaxValue>
tab_strip_web_apps_reparented_state_;
+ std::unique_ptr<TabCyclingEventHandler> tab_cycling_event_handler_;
+
mutable base::WeakPtrFactory<BrowserView> weak_ptr_factory_{this};
};
@@ -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
@@ -59,7 +59,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
}
/**
@@ -71,8 +71,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
}
/**
@@ -84,8 +83,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
}
/**
@@ -97,8 +95,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
@@ -2530,6 +2530,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
@@ -181,6 +181,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
@@ -294,6 +294,7 @@ source_set("browser") {
@@ -298,6 +298,7 @@ source_set("browser") {
"//third_party/re2",
"//third_party/snappy",
"//third_party/sqlite",
@@ -54,7 +54,7 @@
"//tools/v8_context_snapshot:buildflags",
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -80,6 +80,7 @@
@@ -84,6 +84,7 @@
#include "components/services/storage/public/cpp/quota_error_or.h"
#include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
#include "components/tracing/common/tracing_switches.h"
@@ -62,7 +62,7 @@
#include "components/viz/common/switches.h"
#include "components/viz/host/gpu_client.h"
#include "components/viz/host/host_frame_sink_manager.h"
@@ -3493,6 +3494,8 @@ void RenderProcessHostImpl::PropagateBro
@@ -3730,6 +3731,8 @@ void RenderProcessHostImpl::PropagateBro
switches::kEnableWebGLImageChromium,
switches::kEnableWebGPUDeveloperFeatures,
switches::kFileUrlPathAlias,
@@ -70,10 +70,10 @@
+ switches::kFingerprintingCanvasMeasureTextNoise,
switches::kForceDeviceScaleFactor,
switches::kForceDisplayColorProfile,
switches::kForceGpuMemAvailableMb,
switches::kForceHighContrast,
--- a/content/child/BUILD.gn
+++ b/content/child/BUILD.gn
@@ -110,6 +110,7 @@ target(link_target_type, "child") {
@@ -109,6 +109,7 @@ target(link_target_type, "child") {
"//third_party/blink/public/common:buildflags",
"//third_party/blink/public/strings",
"//third_party/ced",
@@ -83,7 +83,7 @@
"//ui/events/blink",
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -40,6 +40,7 @@
@@ -42,6 +42,7 @@
#include "third_party/blink/public/common/loader/referrer_utils.h"
#include "third_party/blink/public/common/switches.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
@@ -91,7 +91,7 @@
#include "ui/accessibility/accessibility_features.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/blink/blink_features.h"
@@ -485,6 +486,10 @@ void SetRuntimeFeaturesFromCommandLine(c
@@ -488,6 +489,10 @@ void SetRuntimeFeaturesFromCommandLine(c
true},
{wrf::EnableWebAudioBypassOutputBufferingOptOut,
blink::switches::kWebAudioBypassOutputBufferingOptOut, true},
@@ -104,9 +104,9 @@
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
@@ -69,6 +69,9 @@ class BLINK_PLATFORM_EXPORT WebRuntimeFe
static void EnableFluentScrollbars(bool);
static void EnableFluentOverlayScrollbars(bool);
@@ -71,6 +71,9 @@ class BLINK_PLATFORM_EXPORT WebRuntimeFe
static void EnableLocalNetworkAccessWebRTC(bool);
+ static void EnableFingerprintingClientRectsNoise(bool);
+ static void EnableFingerprintingCanvasMeasureTextNoise(bool);
@@ -116,15 +116,15 @@
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -42,6 +42,7 @@
@@ -40,6 +40,7 @@
#include "base/i18n/time_formatting.h"
#include "base/metrics/histogram_functions.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
+#include "base/rand_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
@@ -869,6 +870,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();
@@ -995,6 +1001,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
@@ -558,6 +558,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,31 +164,29 @@
V8VisibilityState visibilityState() const;
String visibilityStateAsString() const;
bool IsPageVisible() const;
@@ -2704,6 +2708,9 @@ class CORE_EXPORT Document : public Cont
@@ -2821,6 +2825,9 @@ class CORE_EXPORT Document : public Cont
base::ElapsedTimer start_time_;
+ double noise_factor_x_ = 1;
+ double noise_factor_y_ = 1;
+
Member<ScriptRunner> script_runner_;
Member<ScriptRunnerDelayer> script_runner_delayer_;
// The script runner is used to run scripts of the following scheduling types:
// - ScriptSchedulingType::kAsync
// - ScriptSchedulingType::kInOrder
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -2836,6 +2836,11 @@ DOMRectList* Element::getClientRects() {
DCHECK(element_layout_object);
GetDocument().AdjustQuadsForScrollAndAbsoluteZoom(quads,
*element_layout_object);
+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
+ for (gfx::QuadF& quad : quads) {
@@ -3440,6 +3440,9 @@ Vector<gfx::RectF> Element::GetClientRec
}
Vector<gfx::RectF> result;
for (auto& quad : quads) {
+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
+ quad.Scale(GetDocument().GetNoiseFactorX(), GetDocument().GetNoiseFactorY());
+ }
+ }
return MakeGarbageCollected<DOMRectList>(quads);
}
@@ -2863,6 +2868,9 @@ gfx::RectF Element::GetBoundingClientRec
result.emplace_back(quad.BoundingBox());
}
return result;
@@ -3469,6 +3472,9 @@ gfx::RectF Element::GetBoundingClientRec
DCHECK(element_layout_object);
GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
*element_layout_object);
@@ -200,7 +198,7 @@
--- a/third_party/blink/renderer/core/dom/range.cc
+++ b/third_party/blink/renderer/core/dom/range.cc
@@ -1634,6 +1634,12 @@ DOMRectList* Range::getClientRects() con
@@ -1656,6 +1656,12 @@ DOMRectList* Range::getClientRects() con
Vector<gfx::QuadF> quads;
GetBorderAndTextQuads(quads);
@@ -213,7 +211,7 @@
return MakeGarbageCollected<DOMRectList>(quads);
}
@@ -1641,7 +1647,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();
@@ -228,9 +226,9 @@
// TODO(editing-dev): We should make
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
@@ -106,6 +106,24 @@ const ShapeResult* ShapeWord(const TextR
@@ -90,6 +90,24 @@ TextMetrics::TextMetrics(const Font* fon
Update(font, direction, baseline, align, text, text_painter);
}
} // namespace
+void TextMetrics::Shuffle(const double factor) {
+ // x-direction
@@ -255,7 +253,7 @@
const V8CanvasTextBaseline::Enum baseline,
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.h
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h
@@ -111,6 +111,8 @@ class CORE_EXPORT TextMetrics final : pu
@@ -110,6 +110,8 @@ class CORE_EXPORT TextMetrics final : pu
float x_position_;
};
@@ -275,21 +273,15 @@
+
namespace blink {
constexpr char kDefaultFont[] = "10px sans-serif";
@@ -1182,13 +1185,26 @@ TextMetrics* BaseRenderingContext2D::mea
class MemoryManagedPaintCanvas;
@@ -1171,9 +1174,22 @@ TextMetrics* BaseRenderingContext2D::mea
TextDirection direction =
ToTextDirection(state.GetDirection(), host, computed_style);
- return MakeGarbageCollected<TextMetrics>(
- font, direction, state.GetTextBaseline().AsEnum(),
- state.GetTextAlign().AsEnum(), text,
+ TextMetrics* text_metrics = MakeGarbageCollected<TextMetrics>(
+ font, direction, GetState().GetTextBaseline().AsEnum(),
+ GetState().GetTextAlign().AsEnum(), text,
RuntimeEnabledFeatures::CanvasTextNgEnabled(
host->GetTopExecutionContext())
? &host->GetPlainTextPainter()
: nullptr);
font, direction, state.GetTextBaseline(), state.GetTextAlign(), text,
host->GetPlainTextPainter());
+
+ // Scale text metrics if enabled
+ if (RuntimeEnabledFeatures::FingerprintingCanvasMeasureTextNoiseEnabled()) {
@@ -308,20 +300,20 @@
String BaseRenderingContext2D::lang() const {
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1784,6 +1784,7 @@ component("platform") {
@@ -1809,6 +1809,7 @@ component("platform") {
"//components/paint_preview/common",
"//components/search_engines:search_engine_utils",
"//components/translate/core/language_detection:language_detection",
"//components/translate/core/language_detection",
+ "//components/ungoogled:ungoogled_switches",
"//components/viz/client",
"//components/viz/common",
"//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
@@ -68,4 +68,12 @@ void WebRuntimeFeatures::EnableFluentScr
void WebRuntimeFeatures::EnableFluentOverlayScrollbars(bool enable) {
RuntimeEnabledFeatures::SetFluentOverlayScrollbarsEnabled(enable);
@@ -72,4 +72,12 @@ void WebRuntimeFeatures::EnableLocalNetw
RuntimeEnabledFeatures::SetLocalNetworkAccessWebRTCEnabled(enable);
}
+void WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(bool enable) {
+ RuntimeEnabledFeatures::SetFingerprintingClientRectsNoiseEnabled(enable);
+}
@@ -339,11 +331,11 @@
#include "third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h"
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
#include "third_party/blink/renderer/platform/wtf/text/strcat.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkSurface.h"
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2092,6 +2092,12 @@
@@ -2541,6 +2541,12 @@
status: "stable",
},
{
@@ -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
@@ -2205,6 +2205,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",
@@ -32,8 +32,8 @@ with limited CPU/memory resources and it is disabled by default.
#ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
#define CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
+const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
+ {features::kMaxConnectionsPerHostChoiceDefault, "", ""},
+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"},
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+ {"15", switches::kMaxConnectionsPerHost, "15"},
+};
#endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_
--- a/chrome/browser/bromite_flag_entries.h
@@ -49,7 +49,7 @@ with limited CPU/memory resources and it is disabled by default.
#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -26,6 +26,7 @@
@@ -22,6 +22,7 @@
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
@@ -57,7 +57,7 @@ with limited CPU/memory resources and it is disabled by default.
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
@@ -33,6 +34,7 @@
@@ -29,6 +30,7 @@
#include "base/notreached.h"
#include "base/path_service.h"
#include "base/run_loop.h"
@@ -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"
@@ -118,6 +120,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,15 +73,15 @@ 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"
@@ -151,6 +154,7 @@
@@ -152,6 +155,7 @@
#include "extensions/common/constants.h"
#include "media/media_buildflags.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "net/socket/client_socket_pool_manager.h"
#include "ppapi/buildflags/buildflags.h"
#include "printing/buildflags/buildflags.h"
#include "services/network/public/cpp/features.h"
@@ -417,6 +421,18 @@ void BrowserProcessImpl::Init() {
#include "services/network/public/cpp/network_switches.h"
@@ -464,6 +468,18 @@ void BrowserProcessImpl::Init() {
pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled,
base::BindRepeating(&ApplyMetricsReportingPolicy));
@@ -93,61 +93,26 @@ with limited CPU/memory resources and it is disabled by default.
+ << " expected integer; got (\"" << switch_value << "\" instead)";
+ }
+ if (max_connections_per_host != 0) {
+ net::ClientSocketPoolManager::set_max_sockets_per_group(
+ net::ClientSocketPoolManager::set_max_sockets_per_group_for_test(
+ net::HttpNetworkSession::NORMAL_SOCKET_POOL, max_connections_per_host);
+ }
+
DCHECK(!webrtc_event_log_manager_);
webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance();
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2536,6 +2536,10 @@ const char kMantisFeatureKeyDescription[
"Feature key to use the Mantis feature on ChromeOS.";
#endif // BUILDFLAG(IS_CHROMEOS)
+const char kMaxConnectionsPerHostName[] = "Maximum connections per host";
+const char kMaxConnectionsPerHostDescription[] =
+ "Customize maximum allowed connections per host. ungoogled-chromium flag, Bromite feature.";
+
const char kMediaRouterCastAllowAllIPsName[] =
"Connect to Cast devices on all IP addresses";
const char kMediaRouterCastAllowAllIPsDescription[] =
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1465,6 +1465,9 @@ extern const char kMantisFeatureKeyName[
extern const char kMantisFeatureKeyDescription[];
#endif // IS_CHROMEOS
@@ -2712,6 +2712,10 @@ inline constexpr char kLogJsConsoleMessa
"Enable logging JS console messages in system logs, please note that they "
"may contain PII.";
+extern const char kMaxConnectionsPerHostName[];
+extern const char kMaxConnectionsPerHostDescription[];
+inline constexpr char kMaxConnectionsPerHostName[] = "Maximum connections per host";
+inline constexpr char kMaxConnectionsPerHostDescription[] =
+ "Customize maximum allowed connections per host. ungoogled-chromium flag, Bromite feature.";
+
extern const char kMediaRouterCastAllowAllIPsName[];
extern const char kMediaRouterCastAllowAllIPsDescription[];
--- a/components/network_session_configurator/common/network_features.cc
+++ b/components/network_session_configurator/common/network_features.cc
@@ -8,4 +8,7 @@
namespace features {
+const char kMaxConnectionsPerHostChoiceDefault[] = "6",
+ kMaxConnectionsPerHostChoice15[] = "15";
+
} // namespace features
--- a/components/network_session_configurator/common/network_features.h
+++ b/components/network_session_configurator/common/network_features.h
@@ -10,6 +10,10 @@
namespace features {
+NETWORK_SESSION_CONFIGURATOR_EXPORT extern const char kMaxConnectionsPerHostChoiceDefault[],
+ kMaxConnectionsPerHostChoice6[],
+ kMaxConnectionsPerHostChoice15[];
+
} // namespace features
#endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_
inline constexpr char kMediaRouterCastAllowAllIPsName[] =
"Connect to Cast devices on all IP addresses";
inline constexpr char kMediaRouterCastAllowAllIPsDescription[] =
--- a/components/network_session_configurator/common/network_switch_list.h
+++ b/components/network_session_configurator/common/network_switch_list.h
@@ -19,6 +19,10 @@ NETWORK_SWITCH(kEnableUserAlternateProto
@@ -159,5 +124,5 @@ with limited CPU/memory resources and it is disabled by default.
+NETWORK_SWITCH(kMaxConnectionsPerHost, "max-connections-per-host")
+
// Ignores certificate-related errors.
NETWORK_SWITCH(kIgnoreCertificateErrors, "ignore-certificate-errors")
// Note: In tests using net::EmbeddedTestServer with a custom hostname not
// covered by the default test certs, using this switch is usually incorrect.
@@ -1,34 +0,0 @@
From c89ce946e5328ca8a7df923d421e904bb6bfe9b6 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 7 Jul 2015 18:28:46 +0200
Subject: [PATCH 63/76] safe_browsing: disable reporting of safebrowsing
override
Disables reporting of the safebrowsing override, i.e. the report sent
if a user decides to visit a page that was flagged as "insecure".
This prevents trk:148 (phishing) and trk:149 (malware).
---
components/safe_browsing/content/browser/client_side_detection_service.cc | 5 +++++
1 file changed, 5 insertions(+)
--- a/components/safe_browsing/content/browser/client_side_detection_service.cc
+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
@@ -324,6 +324,10 @@ void ClientSideDetectionService::StartCl
return;
}
+#if 1
+ if (!callback.is_null())
+ callback.Run(GURL(request->url()), false);
+#else
std::string request_data;
request->SerializeToString(&request_data);
@@ -406,6 +410,7 @@ void ClientSideDetectionService::StartCl
base::BindOnce(&WebUIInfoSingleton::AddToClientPhishingRequestsSent,
base::Unretained(WebUIInfoSingleton::GetInstance()),
std::move(request), access_token));
+#endif
}
void ClientSideDetectionService::HandlePhishingVerdict(
@@ -1,69 +0,0 @@
# Disable some background communication with clients2.google.com
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2714,24 +2714,6 @@ void ChromeContentBrowserClient::AppendE
command_line->AppendSwitchASCII(switches::kMetricsClientID,
client_info->client_id);
}
-#elif BUILDFLAG(IS_POSIX)
-#if !BUILDFLAG(IS_ANDROID)
- pid_t pid;
- if (crash_reporter::GetHandlerSocket(nullptr, &pid)) {
- command_line->AppendSwitchASCII(
- crash_reporter::switches::kCrashpadHandlerPid,
- base::NumberToString(pid));
- }
-#endif
- std::string switch_value;
- std::unique_ptr<metrics::ClientInfo> client_info =
- GoogleUpdateSettings::LoadMetricsClientInfo();
- if (client_info) {
- switch_value = client_info->client_id;
- }
- switch_value.push_back(',');
- switch_value.append(chrome::GetChannelName(chrome::WithExtendedStable(true)));
- command_line->AppendSwitchASCII(switches::kEnableCrashReporter, switch_value);
#endif
if (logging::DialogsAreSuppressed())
--- a/components/crash/core/app/crashpad.cc
+++ b/components/crash/core/app/crashpad.cc
@@ -72,6 +72,12 @@ void InitializeDatabasePath(const base::
}
bool InitializeCrashpadImpl(bool initial_client,
+ const std::string& a, const std::string& b, const base::FilePath& c,
+ const std::vector<std::string>& d, bool e) {
+ return false;
+}
+[[maybe_unused]]
+bool DeadInitializeCrashpadImpl(bool initial_client,
const std::string& process_type,
const std::string& user_data_dir,
const base::FilePath& exe_path,
--- a/components/gwp_asan/client/gwp_asan.cc
+++ b/components/gwp_asan/client/gwp_asan.cc
@@ -323,6 +323,11 @@ GWP_ASAN_EXPORT std::optional<AllocatorS
// Exported for testing.
GWP_ASAN_EXPORT std::optional<AllocatorSettings> GetAllocatorSettings(
+ const base::Feature& a, bool b, std::string_view c) {
+ return std::nullopt;
+}
+[[maybe_unused]]
+std::optional<AllocatorSettings> DeadGetAllocatorSettings(
const base::Feature& feature,
bool boost_sampling,
std::string_view process_type) {
--- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc
+++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc
@@ -747,8 +747,6 @@ void CrashpadClient::CrashWithoutDump(co
// static
void CrashpadClient::SetFirstChanceExceptionHandler(
FirstChanceHandler handler) {
- DCHECK(SignalHandler::Get());
- SignalHandler::Get()->SetFirstChanceHandler(handler);
}
// static
@@ -1,61 +0,0 @@
# Disable Google Cloud Messaging (GCM) client
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -432,6 +432,7 @@ void GCMClientImpl::StartGCM() {
void GCMClientImpl::InitializeMCSClient() {
DCHECK(network_connection_tracker_);
+ return;
std::vector<GURL> endpoints;
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
@@ -611,23 +612,6 @@ void GCMClientImpl::RemoveHeartbeatInter
void GCMClientImpl::StartCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
-
- // Make sure no checkin is in progress.
- if (checkin_request_)
- return;
-
- checkin_proto::ChromeBuildProto chrome_build_proto;
- ToCheckinProtoVersion(chrome_build_info_, &chrome_build_proto);
-
- CheckinRequest::RequestInfo request_info(
- device_checkin_info_.android_id, device_checkin_info_.secret,
- gservices_settings_.digest(), chrome_build_proto);
- checkin_request_ = std::make_unique<CheckinRequest>(
- gservices_settings_.GetCheckinURL(), request_info, GetGCMBackoffPolicy(),
- base::BindOnce(&GCMClientImpl::OnCheckinCompleted,
- weak_ptr_factory_.GetWeakPtr()),
- url_loader_factory_, io_task_runner_, &recorder_);
- checkin_request_->Start();
}
void GCMClientImpl::OnCheckinCompleted(
@@ -684,24 +668,6 @@ void GCMClientImpl::SetGServicesSettings
void GCMClientImpl::SchedulePeriodicCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
-
- // Make sure no checkin is in progress.
- if (checkin_request_.get() || !device_checkin_info_.accounts_set)
- return;
-
- // There should be only one periodic checkin pending at a time. Removing
- // pending periodic checkin to schedule a new one.
- periodic_checkin_ptr_factory_.InvalidateWeakPtrs();
-
- base::TimeDelta time_to_next_checkin = GetTimeToNextCheckin();
- if (time_to_next_checkin.is_negative())
- time_to_next_checkin = base::TimeDelta();
-
- io_task_runner_->PostDelayedTask(
- FROM_HERE,
- base::BindOnce(&GCMClientImpl::StartCheckin,
- periodic_checkin_ptr_factory_.GetWeakPtr()),
- time_to_next_checkin);
}
base::TimeDelta GCMClientImpl::GetTimeToNextCheckin() const {
@@ -0,0 +1,16 @@
description: disable the google api key warning when those aren't found
author: Michael Gilbert <mgilbert@debian.org>
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -180,10 +180,6 @@ void AddInfoBarsIfNecessary(BrowserWindo
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
- if (!google_apis::HasAPIKeyConfigured()) {
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
- }
-
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
@@ -1,317 +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
@@ -3496,6 +3496,7 @@ void RenderProcessHostImpl::PropagateBro
switches::kFileUrlPathAlias,
switches::kFingerprintingClientRectsNoise,
switches::kFingerprintingCanvasMeasureTextNoise,
+ switches::kFingerprintingCanvasImageDataNoise,
switches::kForceDeviceScaleFactor,
switches::kForceDisplayColorProfile,
switches::kForceGpuMemAvailableMb,
--- 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
@@ -71,6 +71,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
@@ -508,6 +508,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
@@ -1729,7 +1729,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
@@ -76,4 +76,8 @@ void WebRuntimeFeatures::EnableFingerpri
RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable);
}
+void WebRuntimeFeatures::EnableFingerprintingCanvasImageDataNoise(bool enable) {
+ RuntimeEnabledFeatures::SetFingerprintingCanvasImageDataNoiseEnabled(enable);
+}
+
} // namespace blink
--- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
+++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
@@ -130,6 +130,10 @@ base::span<const uint8_t> ImageDataBuffe
bool ImageDataBuffer::EncodeImage(const ImageEncodingMimeType mime_type,
const double& quality,
Vector<unsigned char>* encoded_image) const {
+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
+ // shuffle subchannel color data within the pixmap
+ StaticBitmapImage::ShuffleSubchannelColorData(pixmap_.writable_addr(), pixmap_.info(), 0, 0);
+ }
return ImageEncoder::Encode(encoded_image, pixmap_, mime_type, quality);
}
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
@@ -4,6 +4,8 @@
#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/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2098,6 +2098,9 @@
name: "FingerprintingCanvasMeasureTextNoise",
},
{
+ name: "FingerprintingCanvasImageDataNoise",
+ },
+ {
name: "Fledge",
status: "stable",
base_feature: "none",
@@ -1,16 +0,0 @@
description: disable the google api key warning when those aren't found
author: Michael Gilbert <mgilbert@debian.org>
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -156,10 +156,6 @@ void AddInfoBarsIfNecessary(Browser* bro
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
- if (!google_apis::HasAPIKeyConfigured()) {
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
- }
-
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
@@ -1,12 +0,0 @@
--- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
@@ -17,9 +17,6 @@
// static
void GoogleApiKeysInfoBarDelegate::Create(
infobars::ContentInfoBarManager* infobar_manager) {
- infobar_manager->AddInfoBar(
- CreateConfirmInfoBar(std::unique_ptr<ConfirmInfoBarDelegate>(
- new GoogleApiKeysInfoBarDelegate())));
}
GoogleApiKeysInfoBarDelegate::GoogleApiKeysInfoBarDelegate() = default;
@@ -1,17 +0,0 @@
--- a/sandbox/linux/BUILD.gn
+++ b/sandbox/linux/BUILD.gn
@@ -295,6 +295,14 @@ if (is_linux || is_chromeos) {
"suid/process_util_linux.c",
"suid/sandbox.c",
]
+
+ cflags = [
+ "-fPIE",
+ ]
+
+ ldflags = [
+ "-pie",
+ ]
}
}
@@ -1,31 +0,0 @@
From d32e222a2706cb59f9855b9cf4330f88d1af5435 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 2 Apr 2015 12:44:23 +0200
Subject: [PATCH 41/66] Remove EV certificates
The team chose to let EV certificates appear just like normal
certificates. The web of trust is considered a failure in itself, so
do not give users a false sense of extra security with EV certs.
Instead, let them appear just like regular ones.
--- a/net/cert/ev_root_ca_metadata.cc
+++ b/net/cert/ev_root_ca_metadata.cc
@@ -36,7 +36,17 @@ struct EVMetadata {
const std::string_view policy_oids[kMaxOIDsPerCA];
};
-#include "net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc"
+static const EVMetadata kEvRootCaMetadata[] = {
+ // need some dummy thing to make compiler happy, because
+ // arraysize() is implemented as a convoluted template rather than
+ // the traditional sizeof(x)/sizeof(*x)
+ { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } },
+ {
+ "0",
+ }
+ }
+};
#endif // defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
} // namespace
@@ -1,19 +0,0 @@
From 7134d5fd762237ad2d80093b68ccbd1582476640 Mon Sep 17 00:00:00 2001
From: Joachim Bauch <jojo@struktur.de>
Date: Thu, 25 Jun 2015 15:51:59 +0200
Subject: [PATCH 56/66] browser: disable profile auto-import on first run
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1578,11 +1578,6 @@ int ChromeBrowserMainParts::PreMainMessa
// and preferences have been registered since some of the import code depends
// on preferences.
if (first_run::IsChromeFirstRun()) {
- // `profile` may be nullptr even on first run, for example when the
- // "BrowserSignin" policy is set to "Force". If so, skip the auto import.
- if (profile) {
- first_run::AutoImport(profile, master_prefs_->import_bookmarks_path);
- }
// Note: This can pop-up the first run consent dialog on Linux & Mac.
first_run::DoPostImportTasks(master_prefs_->make_chrome_default_for_user);
@@ -1,21 +0,0 @@
From d3dcad96b3c2091026c3a81054bb3ce56538a702 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 29 Jan 2015 10:46:40 +0100
Subject: [PATCH 16/66] mime_util: force text/x-suse-ymp to be downloaded
YMP files (YaST One Click Install) are plaintext XML, but also not
very interesting in themselves. Force them to be stored.
---
components/mime_util/mime_util.cc | 1 +
1 file changed, 1 insertion(+)
--- a/third_party/blink/common/mime_util/mime_util.cc
+++ b/third_party/blink/common/mime_util/mime_util.cc
@@ -87,6 +87,7 @@ constexpr auto kUnsupportedTextTypes =
"text/x-csv",
"text/x-vcf",
"text/rtf",
+ "text/x-suse-ymp",
"text/comma-separated-values",
"text/csv",
"text/tab-separated-values",
@@ -1,23 +0,0 @@
From 088a50b2fc66418294166b61f31925426b1a9c54 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 15 Sep 2014 10:52:32 +0200
Subject: [PATCH 12/66] net/cert: increase default key length for
newly-generated RSA keys
Should we add something for chrome://settings, or just leave
it as hidden as it was before?
---
net/cert/x509_util.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/cert/x509_util.cc
+++ b/net/cert/x509_util.cc
@@ -280,7 +280,7 @@ bool GetTLSServerEndPointChannelBinding(
}
// RSA keys created by CreateKeyAndSelfSignedCert will be of this length.
-static const uint16_t kRSAKeyLength = 1024;
+static const uint16_t kRSAKeyLength = 2048;
// Certificates made by CreateKeyAndSelfSignedCert will be signed using this
// digest algorithm.
@@ -1,21 +0,0 @@
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -75,6 +75,7 @@ class FrameGrabHandle : public views::Vi
// Reserve some space for the frame to be grabbed by, even if the tabstrip
// 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);
return gfx::Size(42, 0);
}
};
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -68,4 +68,8 @@
"Disable QR Generator",
"Disables the QR generator for sharing page links. ungoogled-chromium flag",
kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
+ {"remove-grab-handle",
+ "Remove Grab Handle",
+ "Removes the reserved empty space in the tabstrip for moving the window. ungoogled-chromium flag",
+ kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")},
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
@@ -1,46 +0,0 @@
--- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
+++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/sharing_hub/sharing_hub_bubble_controller.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_change_registrar.h"
+#include "components/sharing_message/features.h"
#include "content/public/browser/web_contents.h"
#include "url/gurl.h"
@@ -37,7 +38,7 @@ QRCodeGeneratorBubbleController::~QRCode
// static
bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
- if (!url.SchemeIsHTTPOrHTTPS()) {
+ if (!url.SchemeIsHTTPOrHTTPS() || base::FeatureList::IsEnabled(kDisableQRGenerator)) {
return false;
}
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -64,4 +64,8 @@
"Remove Tabsearch Button",
"Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
+ {"disable-qr-generator",
+ "Disable QR Generator",
+ "Disables the QR generator for sharing page links. ungoogled-chromium flag",
+ kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/components/sharing_message/features.cc
+++ b/components/sharing_message/features.cc
@@ -7,3 +7,5 @@
#include "build/build_config.h"
BASE_FEATURE(kClickToCall, "ClickToCall", base::FEATURE_DISABLED_BY_DEFAULT);
+
+BASE_FEATURE(kDisableQRGenerator, "DisableQRGenerator", base::FEATURE_DISABLED_BY_DEFAULT);
--- a/components/sharing_message/features.h
+++ b/components/sharing_message/features.h
@@ -10,4 +10,5 @@
BASE_DECLARE_FEATURE(kClickToCall);
+BASE_DECLARE_FEATURE(kDisableQRGenerator);
#endif // COMPONENTS_SHARING_MESSAGE_FEATURES_H_
@@ -1,63 +0,0 @@
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1487,7 +1487,8 @@ void BrowserCommandController::InitComma
command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
normal_window);
- const bool enable_tab_search_commands = browser_->is_type_normal();
+ const bool enable_tab_search_commands = browser_->is_type_normal() &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button");
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH,
enable_tab_search_commands);
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -5069,6 +5069,7 @@ void BrowserView::AddedToWidget() {
toolbar_->Init();
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button"))
if (GetIsNormalType()) {
if (features::HasTabSearchToolbarButton()) {
tab_search_bubble_host_ = std::make_unique<TabSearchBubbleHost>(
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
+#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
@@ -119,6 +120,7 @@ TabStripRegionView::TabStripRegionView(s
std::unique_ptr<TabStripComboButton> tab_strip_combo_button;
std::unique_ptr<ProductSpecificationsButton> product_specifications_button;
if (browser &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button") &&
(browser->GetType() == BrowserWindowInterface::Type::TYPE_NORMAL)) {
if (features::IsTabSearchMoving() &&
!features::HasTabSearchToolbarButton() &&
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -60,4 +60,8 @@
"Clear data on exit",
"Clears all browsing data on exit. ungoogled-chromium flag",
kOsDesktop, FEATURE_VALUE_TYPE(features::kClearDataOnExit)},
+ {"remove-tabsearch-button",
+ "Remove Tabsearch Button",
+ "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
+ kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -436,7 +436,8 @@ BASE_FEATURE(kTabstripComboButton,
base::FEATURE_DISABLED_BY_DEFAULT);
bool IsTabSearchMoving() {
- return base::FeatureList::IsEnabled(features::kTabstripComboButton);
+ return base::FeatureList::IsEnabled(features::kTabstripComboButton) &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button");
}
const base::FeatureParam<bool> kTabstripComboButtonHasBackground{
@@ -1,29 +0,0 @@
--- a/chrome/browser/sharing_hub/sharing_hub_features.cc
+++ b/chrome/browser/sharing_hub/sharing_hub_features.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/sharing_hub/sharing_hub_features.h"
+#include "base/command_line.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
@@ -36,6 +37,7 @@ bool ScreenshotsDisabledByPolicy(content
} // namespace
bool SharingHubOmniboxEnabled(content::BrowserContext* context) {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-sharing-hub")) return false;
#if BUILDFLAG(IS_CHROMEOS)
return false;
#else
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -96,4 +96,8 @@
"Custom HTTP Accept Header",
"Set a custom value for the Accept header which is sent by the browser with every HTTP request. (e.g. `text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8`). ungoogled-chromium flag.",
kOsAll, ORIGIN_LIST_VALUE_TYPE("http-accept-header", "")},
+ {"disable-sharing-hub",
+ "Disable Sharing Hub",
+ "Disables the sharing hub button. ungoogled-chromium flag.",
+ kOsDesktop, SINGLE_VALUE_TYPE("disable-sharing-hub")},
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
@@ -1,83 +0,0 @@
--- a/chrome/browser/media/webrtc/capture_policy_utils.cc
+++ b/chrome/browser/media/webrtc/capture_policy_utils.cc
@@ -56,36 +56,7 @@ void IsMultiCaptureAllowedForAnyOriginOn
base::OnceCallback<void(bool)> callback,
content::BrowserContext* context,
bool is_multi_capture_allowed_for_any_origin_on_main_profile) {
- // If the new MultiScreenCaptureAllowedForUrls policy permits access, exit
- // early. If not, check the legacy
- // GetDisplayMediaSetSelectAllScreensAllowedForUrls policy.
- if (is_multi_capture_allowed_for_any_origin_on_main_profile) {
- std::move(callback).Run(true);
- return;
- }
-
- // TODO(b/329064666): Remove the checks below once the pivot to IWAs is
- // complete.
- Profile* profile = Profile::FromBrowserContext(context);
- if (!profile) {
std::move(callback).Run(false);
- return;
- }
-
- HostContentSettingsMap* host_content_settings_map =
- HostContentSettingsMapFactory::GetForProfile(profile);
- if (!host_content_settings_map) {
- std::move(callback).Run(false);
- return;
- }
- ContentSettingsForOneType content_settings =
- host_content_settings_map->GetSettingsForOneType(
- ContentSettingsType::ALL_SCREEN_CAPTURE);
- std::move(callback).Run(std::ranges::any_of(
- content_settings, [](const ContentSettingPatternSource& source) {
- return source.GetContentSetting() ==
- ContentSetting::CONTENT_SETTING_ALLOW;
- }));
}
void CheckAllScreensMediaAllowedForIwaResultReceived(
@@ -257,43 +228,13 @@ void RegisterProfilePrefs(PrefRegistrySi
void CheckGetAllScreensMediaAllowedForAnyOrigin(
content::BrowserContext* context,
base::OnceCallback<void(bool)> callback) {
-#if BUILDFLAG(IS_CHROMEOS)
- if (crosapi::mojom::MultiCaptureService* multi_capture_service =
- GetMultiCaptureService()) {
- multi_capture_service->IsMultiCaptureAllowedForAnyOriginOnMainProfile(
- base::BindOnce(
- IsMultiCaptureAllowedForAnyOriginOnMainProfileResultReceived,
- std::move(callback), context));
- } else {
- // If the multi capture service is not available with the required version,
- // fall back to the original flow using the deprecated policy.
- IsMultiCaptureAllowedForAnyOriginOnMainProfileResultReceived(
- std::move(callback), context, /*result=*/false);
- }
-#else
std::move(callback).Run(false);
-#endif // BUILDFLAG(IS_CHROMEOS)
}
void CheckGetAllScreensMediaAllowed(content::BrowserContext* context,
const GURL& url,
base::OnceCallback<void(bool)> callback) {
-#if BUILDFLAG(IS_CHROMEOS)
- crosapi::mojom::MultiCaptureService* multi_capture_service =
- GetMultiCaptureService();
- if (multi_capture_service) {
- multi_capture_service->IsMultiCaptureAllowed(
- url, base::BindOnce(&CheckAllScreensMediaAllowedForIwaResultReceived,
- std::move(callback), std::move(url), context));
- } else {
- // If the multi capture service is not available with the required version,
- // fall back to the original flow using the deprecated policy.
- CheckAllScreensMediaAllowedForIwaResultReceived(
- std::move(callback), std::move(url), context, /*result=*/false);
- }
-#else
std::move(callback).Run(false);
-#endif // BUILDFLAG(IS_CHROMEOS)
}
#if BUILDFLAG(ENABLE_SCREEN_CAPTURE)
@@ -1,290 +0,0 @@
# Disables file download quarantining
--- a/components/download/internal/common/base_file.cc
+++ b/components/download/internal/common/base_file.cc
@@ -29,7 +29,6 @@
#include "components/download/public/common/download_interrupt_reasons_utils.h"
#include "components/download/public/common/download_item.h"
#include "components/download/public/common/download_stats.h"
-#include "components/services/quarantine/quarantine.h"
#include "crypto/secure_hash.h"
#if BUILDFLAG(IS_ANDROID)
@@ -535,94 +534,10 @@ DownloadInterruptReason BaseFile::Publis
}
#endif // BUILDFLAG(IS_ANDROID)
-namespace {
-
-DownloadInterruptReason QuarantineFileResultToReason(
- quarantine::mojom::QuarantineFileResult result) {
- switch (result) {
- case quarantine::mojom::QuarantineFileResult::OK:
- return DOWNLOAD_INTERRUPT_REASON_NONE;
- case quarantine::mojom::QuarantineFileResult::VIRUS_INFECTED:
- return DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED;
- case quarantine::mojom::QuarantineFileResult::SECURITY_CHECK_FAILED:
- return DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED;
- case quarantine::mojom::QuarantineFileResult::BLOCKED_BY_POLICY:
- return DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED;
- case quarantine::mojom::QuarantineFileResult::ACCESS_DENIED:
- return DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED;
-
- case quarantine::mojom::QuarantineFileResult::FILE_MISSING:
- // Don't have a good interrupt reason here. This return code means that
- // the file at |full_path_| went missing before QuarantineFile got to
- // look at it. Not expected to happen, but we've seen instances where a
- // file goes missing immediately after BaseFile closes the handle.
- //
- // Intentionally using a different error message than
- // SECURITY_CHECK_FAILED in order to distinguish the two.
- return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
-
- case quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED:
- // This means that the mark-of-the-web couldn't be applied. The file is
- // already on the file system under its final target name.
- //
- // Causes of failed annotations typically aren't transient. E.g. the
- // target file system may not support extended attributes or alternate
- // streams. We are going to allow these downloads to progress on the
- // assumption that failures to apply MOTW can't reliably be introduced
- // remotely.
- return DOWNLOAD_INTERRUPT_REASON_NONE;
- }
- return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
-}
-
-} // namespace
-
// static
GURL BaseFile::GetEffectiveAuthorityURL(const GURL& source_url,
const GURL& referrer_url) {
- if (source_url.is_valid()) {
- // http{,s} has an authority and are supported.
- if (source_url.SchemeIsHTTPOrHTTPS())
- return source_url;
-
- // If the download source is file:// ideally we should copy the MOTW from
- // the original file, but given that Chrome/Chromium places strict
- // restrictions on which schemes can reference file:// URLs, this code is
- // going to assume that at this point it's okay to treat this download as
- // being from the local system.
- if (source_url.SchemeIsFile())
return source_url;
-
- // ftp:// has an authority.
- if (source_url.SchemeIs(url::kFtpScheme))
- return source_url;
-
- if (source_url.SchemeIs(url::kBlobScheme))
- return url::Origin::Create(source_url).GetURL();
- }
-
- if (referrer_url.is_valid() && referrer_url.SchemeIsHTTPOrHTTPS())
- return referrer_url;
-
- return GURL();
-}
-
-void BaseFile::OnFileQuarantined(
- quarantine::mojom::QuarantineFileResult result) {
- DCHECK(on_annotation_done_callback_);
- quarantine_service_.reset();
- std::move(on_annotation_done_callback_)
- .Run(QuarantineFileResultToReason(result));
-}
-
-void BaseFile::OnQuarantineServiceError(const GURL& source_url,
- const GURL& referrer_url) {
-#if BUILDFLAG(IS_WIN)
- OnFileQuarantined(quarantine::SetInternetZoneIdentifierDirectly(
- full_path_, source_url, referrer_url));
-#else // !BUILDFLAG(IS_WIN)
- NOTREACHED() << "In-process quarantine service should not have failed.";
-#endif // !BUILDFLAG(IS_WIN)
}
void BaseFile::AnnotateWithSourceInformation(
@@ -632,32 +547,8 @@ void BaseFile::AnnotateWithSourceInforma
const std::optional<url::Origin>& request_initiator,
mojo::PendingRemote<quarantine::mojom::Quarantine> remote_quarantine,
OnAnnotationDoneCallback on_annotation_done_callback) {
- GURL authority_url = GetEffectiveAuthorityURL(source_url, referrer_url);
- if (!remote_quarantine) {
-#if BUILDFLAG(IS_WIN)
- quarantine::mojom::QuarantineFileResult result =
- quarantine::SetInternetZoneIdentifierDirectly(full_path_, authority_url,
- referrer_url);
-#else
- quarantine::mojom::QuarantineFileResult result =
- quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED;
-#endif
- std::move(on_annotation_done_callback)
- .Run(QuarantineFileResultToReason(result));
- } else {
- quarantine_service_.Bind(std::move(remote_quarantine));
-
- on_annotation_done_callback_ = std::move(on_annotation_done_callback);
-
- quarantine_service_.set_disconnect_handler(base::BindOnce(
- &BaseFile::OnQuarantineServiceError, weak_factory_.GetWeakPtr(),
- authority_url, referrer_url));
-
- quarantine_service_->QuarantineFile(
- full_path_, authority_url, referrer_url, request_initiator, client_guid,
- base::BindOnce(&BaseFile::OnFileQuarantined,
- weak_factory_.GetWeakPtr()));
- }
+ std::move(on_annotation_done_callback)
+ .Run(DOWNLOAD_INTERRUPT_REASON_NONE);
}
} // namespace download
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -129,7 +129,6 @@ source_set("browser") {
"//components/performance_manager/scenario_api",
"//components/power_monitor",
"//components/services/filesystem:lib",
- "//components/services/quarantine:quarantine",
"//components/services/storage",
"//components/services/storage:filesystem_proxy_factory",
"//components/services/storage/dom_storage:local_storage_proto",
--- a/content/browser/file_system_access/file_system_access_safe_move_helper.cc
+++ b/content/browser/file_system_access/file_system_access_safe_move_helper.cc
@@ -13,7 +13,6 @@
#include "base/task/thread_pool.h"
#include "base/thread_annotations.h"
#include "build/build_config.h"
-#include "components/services/quarantine/quarantine.h"
#include "content/browser/file_system_access/features.h"
#include "content/browser/file_system_access/file_system_access_error.h"
#include "content/public/browser/content_browser_client.h"
@@ -229,22 +228,9 @@ void FileSystemAccessSafeMoveHelper::Did
// not exist anymore. In case of error, the source file URL will point to a
// valid filesystem location.
base::OnceCallback<void(base::File::Error)> result_callback;
- if (RequireQuarantine()) {
- GURL referrer_url = manager_->is_off_the_record() ? GURL() : context_.url;
- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote;
- if (quarantine_connection_callback_) {
- quarantine_connection_callback_.Run(
- quarantine_remote.BindNewPipeAndPassReceiver());
- }
- result_callback =
- base::BindOnce(&FileSystemAccessSafeMoveHelper::DidFileDoQuarantine,
- weak_factory_.GetWeakPtr(), dest_url(), referrer_url,
- std::move(quarantine_remote));
- } else {
result_callback =
base::BindOnce(&FileSystemAccessSafeMoveHelper::DidFileSkipQuarantine,
weak_factory_.GetWeakPtr());
- }
manager_->DoFileSystemOperation(
FROM_HERE, &storage::FileSystemOperationRunner::Move,
std::move(result_callback), source_url(), dest_url(), options_,
@@ -261,7 +247,6 @@ void FileSystemAccessSafeMoveHelper::Did
void FileSystemAccessSafeMoveHelper::DidFileDoQuarantine(
const storage::FileSystemURL& target_url,
const GURL& referrer_url,
- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
base::File::Error result) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -292,40 +277,9 @@ void FileSystemAccessSafeMoveHelper::Did
referrer_url.is_valid() && referrer_url.SchemeIsHTTPOrHTTPS()
? referrer_url
: GURL();
-
- if (quarantine_remote) {
- quarantine::mojom::Quarantine* raw_quarantine = quarantine_remote.get();
- raw_quarantine->QuarantineFile(
- target_url.path(), authority_url, referrer_url,
- // TODO(crbug.com/351165321): Consider propagating request_initiator
- // information here.
- /*request_initiator=*/std::nullopt,
- GetContentClient()
- ->browser()
- ->GetApplicationClientGUIDForQuarantineCheck(),
- mojo::WrapCallbackWithDefaultInvokeIfNotRun(
- base::BindOnce(&FileSystemAccessSafeMoveHelper::DidAnnotateFile,
- weak_factory_.GetWeakPtr(),
- std::move(quarantine_remote)),
- quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED));
- } else {
-#if BUILDFLAG(IS_WIN)
- base::ThreadPool::PostTaskAndReplyWithResult(
- FROM_HERE, {base::MayBlock()},
- base::BindOnce(&quarantine::SetInternetZoneIdentifierDirectly,
- target_url.path(), authority_url, referrer_url),
- base::BindOnce(&FileSystemAccessSafeMoveHelper::DidAnnotateFile,
- weak_factory_.GetWeakPtr(),
- std::move(quarantine_remote)));
-#else
- DidAnnotateFile(std::move(quarantine_remote),
- quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED);
-#endif
- }
}
void FileSystemAccessSafeMoveHelper::DidAnnotateFile(
- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
quarantine::mojom::QuarantineFileResult result) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
--- a/content/browser/file_system_access/file_system_access_safe_move_helper.h
+++ b/content/browser/file_system_access/file_system_access_safe_move_helper.h
@@ -66,10 +66,8 @@ class CONTENT_EXPORT FileSystemAccessSaf
void DidFileDoQuarantine(
const storage::FileSystemURL& target_url,
const GURL& referrer_url,
- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
base::File::Error result);
void DidAnnotateFile(
- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
quarantine::mojom::QuarantineFileResult result);
void ComputeHashForSourceFile(HashCallback callback);
--- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc
@@ -462,7 +462,7 @@ void PepperFileIOHost::OnLocalFileOpened
ppapi::host::ReplyMessageContext reply_context,
const base::FilePath& path,
base::File::Error error_code) {
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if 0
// Quarantining a file before its contents are available is only supported on
// Windows and Linux.
if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) {
@@ -496,7 +496,7 @@ void PepperFileIOHost::OnLocalFileOpened
#endif
}
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if 0
void PepperFileIOHost::OnLocalFileQuarantined(
ppapi::host::ReplyMessageContext reply_context,
const base::FilePath& path,
--- a/content/browser/renderer_host/pepper/pepper_file_io_host.h
+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.h
@@ -14,7 +14,6 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "components/services/quarantine/public/mojom/quarantine.mojom.h"
#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_platform_file.h"
@@ -93,12 +92,6 @@ class PepperFileIOHost final : public pp
const base::FilePath& path,
base::File::Error error_code);
- void OnLocalFileQuarantined(
- ppapi::host::ReplyMessageContext reply_context,
- const base::FilePath& path,
- mojo::Remote<quarantine::mojom::Quarantine> quarantine_remote,
- quarantine::mojom::QuarantineFileResult quarantine_result);
-
void SendFileOpenReply(ppapi::host::ReplyMessageContext reply_context,
base::File::Error error_code);
@@ -1,11 +0,0 @@
--- a/components/safe_browsing/core/common/features.cc
+++ b/components/safe_browsing/core/common/features.cc
@@ -121,7 +121,7 @@ BASE_FEATURE(kDlpRegionalizedEndpoints,
BASE_FEATURE(kDownloadsPageReferrerUrl,
"DownloadsPageReferrerUrl",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kDownloadWarningSurvey,
"DownloadWarningSurvey",
@@ -1,22 +0,0 @@
# Disables omission of URL elements in Omnibox and status bubble
--- a/chrome/browser/ui/status_bubble.h
+++ b/chrome/browser/ui/status_bubble.h
@@ -17,7 +17,7 @@ class GURL;
class StatusBubble {
public:
// On hover, expand status bubble to fit long URL after this delay.
- static const int kExpandHoverDelayMS = 1600;
+ static const int kExpandHoverDelayMS = 0;
virtual ~StatusBubble() = default;
--- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
+++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
@@ -266,5 +266,5 @@ TemplateURLService* ChromeLocationBarMod
// static
void ChromeLocationBarModelDelegate::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
- registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, false);
+ registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, true);
}
@@ -1,11 +0,0 @@
--- a/components/optimization_guide/core/optimization_guide_features.cc
+++ b/components/optimization_guide/core/optimization_guide_features.cc
@@ -55,7 +55,7 @@ BASE_FEATURE(kOptimizationHints,
// Enables fetching from a remote Optimization Guide Service.
BASE_FEATURE(kRemoteOptimizationGuideFetching,
"OptimizationHintsFetching",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kRemoteOptimizationGuideFetchingAnonymousDataConsent,
"OptimizationHintsFetchingAnonymousDataConsent",
@@ -1,13 +0,0 @@
# Enable chrome://flags/#prefetch-privacy-changes by default
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -2060,7 +2060,7 @@ BASE_FEATURE(kPrefetchFontLookupTables,
// crbug.com/988956.
BASE_FEATURE(kPrefetchPrivacyChanges,
"PrefetchPrivacyChanges",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kPreloadingHeuristicsMLModel,
"PreloadingHeuristicsMLModel",
@@ -1,112 +0,0 @@
# Enable extra locales not normally shipped with Chromium on desktop
--- a/build/config/locales.gni
+++ b/build/config/locales.gni
@@ -166,12 +166,6 @@ _non_android_locales = [ "cy" ]
# Setup |platform_pak_locales| for each platform.
platform_pak_locales = all_chrome_locales
-if (is_android) {
- platform_pak_locales -= _non_android_locales
- extended_locales -= _non_android_locales
-} else {
- platform_pak_locales -= extended_locales
-}
# The base list for all platforms except Android excludes the extended locales.
# Add or subtract platform specific locales below.
--- a/chrome/app/resources/locale_settings_linux.grd
+++ b/chrome/app/resources/locale_settings_linux.grd
@@ -4,11 +4,11 @@
<output filename="grit/platform_locale_settings.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
- <if expr="is_android">
<output filename="platform_locale_settings_as.pak" type="data_package" lang="as" />
<output filename="platform_locale_settings_az.pak" type="data_package" lang="az" />
<output filename="platform_locale_settings_be.pak" type="data_package" lang="be" />
<output filename="platform_locale_settings_bs.pak" type="data_package" lang="bs" />
+ <output filename="platform_locale_settings_cy.pak" type="data_package" lang="cy" />
<output filename="platform_locale_settings_eu.pak" type="data_package" lang="eu" />
<output filename="platform_locale_settings_fr-CA.pak" type="data_package" lang="fr-CA" />
<output filename="platform_locale_settings_gl.pak" type="data_package" lang="gl" />
@@ -31,7 +31,6 @@
<output filename="platform_locale_settings_uz.pak" type="data_package" lang="uz" />
<output filename="platform_locale_settings_zh-HK.pak" type="data_package" lang="zh-HK" />
<output filename="platform_locale_settings_zu.pak" type="data_package" lang="zu" />
- </if>
<output filename="platform_locale_settings_af.pak" type="data_package" lang="af" />
<output filename="platform_locale_settings_am.pak" type="data_package" lang="am" />
<output filename="platform_locale_settings_ar.pak" type="data_package" lang="ar" />
--- a/chrome/app/resources/locale_settings_mac.grd
+++ b/chrome/app/resources/locale_settings_mac.grd
@@ -4,6 +4,33 @@
<output filename="grit/platform_locale_settings.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
+ <output filename="platform_locale_settings_as.pak" type="data_package" lang="as" />
+ <output filename="platform_locale_settings_az.pak" type="data_package" lang="az" />
+ <output filename="platform_locale_settings_be.pak" type="data_package" lang="be" />
+ <output filename="platform_locale_settings_bs.pak" type="data_package" lang="bs" />
+ <output filename="platform_locale_settings_cy.pak" type="data_package" lang="cy" />
+ <output filename="platform_locale_settings_eu.pak" type="data_package" lang="eu" />
+ <output filename="platform_locale_settings_fr-CA.pak" type="data_package" lang="fr-CA" />
+ <output filename="platform_locale_settings_gl.pak" type="data_package" lang="gl" />
+ <output filename="platform_locale_settings_hy.pak" type="data_package" lang="hy" />
+ <output filename="platform_locale_settings_is.pak" type="data_package" lang="is" />
+ <output filename="platform_locale_settings_ka.pak" type="data_package" lang="ka" />
+ <output filename="platform_locale_settings_kk.pak" type="data_package" lang="kk" />
+ <output filename="platform_locale_settings_km.pak" type="data_package" lang="km" />
+ <output filename="platform_locale_settings_ky.pak" type="data_package" lang="ky" />
+ <output filename="platform_locale_settings_lo.pak" type="data_package" lang="lo" />
+ <output filename="platform_locale_settings_mk.pak" type="data_package" lang="mk" />
+ <output filename="platform_locale_settings_mn.pak" type="data_package" lang="mn" />
+ <output filename="platform_locale_settings_my.pak" type="data_package" lang="my" />
+ <output filename="platform_locale_settings_ne.pak" type="data_package" lang="ne" />
+ <output filename="platform_locale_settings_or.pak" type="data_package" lang="or" />
+ <output filename="platform_locale_settings_pa.pak" type="data_package" lang="pa" />
+ <output filename="platform_locale_settings_si.pak" type="data_package" lang="si" />
+ <output filename="platform_locale_settings_sq.pak" type="data_package" lang="sq" />
+ <output filename="platform_locale_settings_sr-Latn.pak" type="data_package" lang="sr-Latn" />
+ <output filename="platform_locale_settings_uz.pak" type="data_package" lang="uz" />
+ <output filename="platform_locale_settings_zh-HK.pak" type="data_package" lang="zh-HK" />
+ <output filename="platform_locale_settings_zu.pak" type="data_package" lang="zu" />
<output filename="platform_locale_settings_af.pak" type="data_package" lang="af" />
<output filename="platform_locale_settings_am.pak" type="data_package" lang="am" />
<output filename="platform_locale_settings_ar.pak" type="data_package" lang="ar" />
--- a/chrome/app/resources/locale_settings_win.grd
+++ b/chrome/app/resources/locale_settings_win.grd
@@ -4,6 +4,33 @@
<output filename="grit/platform_locale_settings.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
+ <output filename="platform_locale_settings_as.pak" type="data_package" lang="as" />
+ <output filename="platform_locale_settings_az.pak" type="data_package" lang="az" />
+ <output filename="platform_locale_settings_be.pak" type="data_package" lang="be" />
+ <output filename="platform_locale_settings_bs.pak" type="data_package" lang="bs" />
+ <output filename="platform_locale_settings_cy.pak" type="data_package" lang="cy" />
+ <output filename="platform_locale_settings_eu.pak" type="data_package" lang="eu" />
+ <output filename="platform_locale_settings_fr-CA.pak" type="data_package" lang="fr-CA" />
+ <output filename="platform_locale_settings_gl.pak" type="data_package" lang="gl" />
+ <output filename="platform_locale_settings_hy.pak" type="data_package" lang="hy" />
+ <output filename="platform_locale_settings_is.pak" type="data_package" lang="is" />
+ <output filename="platform_locale_settings_ka.pak" type="data_package" lang="ka" />
+ <output filename="platform_locale_settings_kk.pak" type="data_package" lang="kk" />
+ <output filename="platform_locale_settings_km.pak" type="data_package" lang="km" />
+ <output filename="platform_locale_settings_ky.pak" type="data_package" lang="ky" />
+ <output filename="platform_locale_settings_lo.pak" type="data_package" lang="lo" />
+ <output filename="platform_locale_settings_mk.pak" type="data_package" lang="mk" />
+ <output filename="platform_locale_settings_mn.pak" type="data_package" lang="mn" />
+ <output filename="platform_locale_settings_my.pak" type="data_package" lang="my" />
+ <output filename="platform_locale_settings_ne.pak" type="data_package" lang="ne" />
+ <output filename="platform_locale_settings_or.pak" type="data_package" lang="or" />
+ <output filename="platform_locale_settings_pa.pak" type="data_package" lang="pa" />
+ <output filename="platform_locale_settings_si.pak" type="data_package" lang="si" />
+ <output filename="platform_locale_settings_sq.pak" type="data_package" lang="sq" />
+ <output filename="platform_locale_settings_sr-Latn.pak" type="data_package" lang="sr-Latn" />
+ <output filename="platform_locale_settings_uz.pak" type="data_package" lang="uz" />
+ <output filename="platform_locale_settings_zh-HK.pak" type="data_package" lang="zh-HK" />
+ <output filename="platform_locale_settings_zu.pak" type="data_package" lang="zu" />
<output filename="platform_locale_settings_af.pak" type="data_package" lang="af" />
<output filename="platform_locale_settings_am.pak" type="data_package" lang="am" />
<output filename="platform_locale_settings_ar.pak" type="data_package" lang="ar" />
@@ -1,77 +0,0 @@
# Add more URL schemes allowed for saving
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -557,11 +557,6 @@ int GetContentRestrictions(const Browser
CoreTabHelper* core_tab_helper =
CoreTabHelper::FromWebContents(current_tab);
content_restrictions = core_tab_helper->content_restrictions();
- NavigationEntry* last_committed_entry =
- current_tab->GetController().GetLastCommittedEntry();
- if (!content::IsSavableURL(last_committed_entry->GetURL())) {
- content_restrictions |= CONTENT_RESTRICTION_SAVE;
- }
}
return content_restrictions;
}
@@ -1712,8 +1707,7 @@ bool CanSavePage(const Browser* browser)
policy::DownloadRestriction::ALL_FILES) {
return false;
}
- return !browser->is_type_devtools() &&
- !(GetContentRestrictions(browser) & CONTENT_RESTRICTION_SAVE);
+ return true;
}
void Print(Browser* browser) {
--- a/components/offline_pages/core/offline_page_model.cc
+++ b/components/offline_pages/core/offline_page_model.cc
@@ -21,7 +21,7 @@ OfflinePageModel::SavePageParams::~SaveP
// static
bool OfflinePageModel::CanSaveURL(const GURL& url) {
- return url.is_valid() && url.SchemeIsHTTPOrHTTPS();
+ return url.is_valid();
}
OfflinePageModel::OfflinePageModel() = default;
--- a/content/common/url_schemes.cc
+++ b/content/common/url_schemes.cc
@@ -24,13 +24,21 @@ namespace {
bool g_registered_url_schemes = false;
const char* const kDefaultSavableSchemes[] = {
+ url::kAboutScheme,
+ url::kBlobScheme,
+ url::kContentScheme,
url::kHttpScheme,
url::kHttpsScheme,
url::kFileScheme,
url::kFileSystemScheme,
kChromeDevToolsScheme,
kChromeUIScheme,
- url::kDataScheme
+ url::kDataScheme,
+ url::kJavaScriptScheme,
+ url::kMailToScheme,
+ url::kWsScheme,
+ url::kWssScheme,
+ kViewSourceScheme
};
// These lists are lazily initialized below and are leaked on shutdown to
--- a/content/public/common/url_utils.cc
+++ b/content/public/common/url_utils.cc
@@ -33,11 +33,7 @@ bool HasWebUIOrigin(const url::Origin& o
}
bool IsSavableURL(const GURL& url) {
- for (auto& scheme : GetSavableSchemes()) {
- if (url.SchemeIs(scheme))
- return true;
- }
- return false;
+ return true;
}
bool IsURLHandledByNetworkStack(const GURL& url) {
@@ -1,34 +0,0 @@
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -222,12 +222,10 @@ TabStripRegionView::TabStripRegionView(s
new_tab_button_->GetViewAccessibility().SetName(
l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB));
-#if BUILDFLAG(IS_LINUX)
// The New Tab Button can be middle-clicked on Linux.
new_tab_button_->SetTriggerableEventFlags(
new_tab_button_->GetTriggerableEventFlags() |
ui::EF_MIDDLE_MOUSE_BUTTON);
-#endif
}
}
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -2185,8 +2185,6 @@ void TabStrip::NewTabButtonPressed(const
const ui::MouseEvent& mouse = static_cast<const ui::MouseEvent&>(event);
if (mouse.IsOnlyMiddleMouseButton()) {
- if (ui::Clipboard::IsSupportedClipboardBuffer(
- ui::ClipboardBuffer::kSelection)) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
CHECK(clipboard)
<< "Clipboard instance is not available, cannot proceed with "
@@ -2197,7 +2195,6 @@ void TabStrip::NewTabButtonPressed(const
if (!clipboard_text.empty()) {
controller_->CreateNewTabWithLocation(clipboard_text);
}
- }
return;
}
}
@@ -1,14 +0,0 @@
--- a/components/dom_distiller/core/css/distilledpage.css
+++ b/components/dom_distiller/core/css/distilledpage.css
@@ -28,6 +28,11 @@
box-sizing: border-box;
}
+.material-icons {
+ font-family: Material Icons;
+ font-style: normal !important;
+}
+
/* Remove all margins and padding from certain element and add word wrap. */
blockquote,
@@ -1,41 +0,0 @@
--- a/components/webui/flags/flags_state.cc
+++ b/components/webui/flags/flags_state.cc
@@ -31,6 +31,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
+#include "chrome/browser/unexpire_flags.h"
#include "components/variations/field_trial_config/field_trial_util.h"
#include "components/variations/variations_associated_data.h"
#include "components/variations/variations_switches.h"
@@ -686,14 +687,19 @@ void FlagsState::GetFlagFeatureEntries(
int current_platform = GetCurrentPlatform();
for (const FeatureEntry& entry : feature_entries_) {
+ std::string desc = entry.visible_description;
if (skip_feature_entry.Run(entry)) {
+ if (flags::IsFlagExpired(flags_storage, entry.internal_name)) {
+ desc.insert(0, "!!! NOTE: THIS FLAG IS EXPIRED AND MAY STOP FUNCTIONING OR BE REMOVED SOON !!! ");
+ } else {
continue;
+ }
}
base::Value::Dict data;
data.Set("internal_name", entry.internal_name);
data.Set("name", entry.visible_name);
- data.Set("description", entry.visible_description);
+ data.Set("description", desc);
base::Value::List supported_platforms;
AddOsStrings(entry.supported_platforms, &supported_platforms);
@@ -1102,7 +1108,9 @@ bool FlagsState::IsSupportedFeature(cons
continue;
}
if (delegate_ && delegate_->ShouldExcludeFlag(storage, entry)) {
+ if (!flags::IsFlagExpired(storage, entry.internal_name)) {
continue;
+ }
}
return true;
}
@@ -1,12 +0,0 @@
# Remove the "--disable-setuid-sandbox" command line flag as a bad flag
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
@@ -69,7 +69,6 @@ const char* const kBadFlags[] = {
// These flags disable sandbox-related security.
sandbox::policy::switches::kDisableGpuSandbox,
sandbox::policy::switches::kDisableSeccompFilterSandbox,
- sandbox::policy::switches::kDisableSetuidSandbox,
sandbox::policy::switches::kNoSandbox,
#if BUILDFLAG(IS_WIN)
sandbox::policy::switches::kAllowThirdPartyModules,
@@ -0,0 +1,238 @@
--- a/extensions/common/extension_l10n_util.h
+++ b/extensions/common/extension_l10n_util.h
@@ -81,7 +81,8 @@ bool LocalizeManifest(const extensions::
bool LocalizeExtension(const base::FilePath& extension_path,
base::Value::Dict* manifest,
GzippedMessagesPermission gzip_permission,
- std::string* error);
+ std::string* error,
+ bool is_component = false);
// Adds locale_name to the extension if it's in chrome_locales, and
// if messages file is present (we don't check content of messages file here).
@@ -129,6 +130,11 @@ extensions::MessageBundle* LoadMessageCa
GzippedMessagesPermission gzip_permission,
std::string* error);
+extensions::MessageBundle* LoadComponentMessageCatalogs(
+ const base::FilePath& extension_root,
+ const std::string& default_locale,
+ std::string* error);
+
// Loads message catalogs for all locales to check for validity. Used for
// validating unpacked extensions.
bool ValidateExtensionLocales(const base::FilePath& extension_path,
--- a/extensions/common/extension_l10n_util.cc
+++ b/extensions/common/extension_l10n_util.cc
@@ -17,14 +17,18 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
+#include "base/memory/ref_counted_memory.h"
#include "base/no_destructor.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "extensions/browser/component_extension_resource_manager.h"
+#include "extensions/browser/extensions_browser_client.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
@@ -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"
+#include "ui/base/resource/resource_bundle.h"
namespace errors = extensions::manifest_errors;
namespace keys = extensions::manifest_keys;
@@ -113,6 +118,19 @@ std::optional<base::Value::Dict> LoadMes
return dictionary;
}
+std::optional<base::Value::Dict> LoadMessageFile(
+ int resource_id, std::string* error) {
+ const ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ JSONStringValueDeserializer messages_deserializer(
+ base::as_string_view(*rb.LoadDataResourceBytes(resource_id)));
+
+ if (auto value = messages_deserializer.Deserialize(nullptr, error); value) {
+ return std::move(*value).TakeDict();
+ }
+
+ return std::nullopt;
+}
+
// Localizes manifest value of string type for a given key.
bool LocalizeManifestValue(const std::string& key,
const extensions::MessageBundle& messages,
@@ -360,13 +378,16 @@ bool LocalizeManifest(const extensions::
bool LocalizeExtension(const base::FilePath& extension_path,
base::Value::Dict* manifest,
GzippedMessagesPermission gzip_permission,
- std::string* error) {
+ std::string* error,
+ bool is_component) {
DCHECK(manifest);
std::string default_locale = GetDefaultLocaleFromManifest(*manifest, error);
std::unique_ptr<extensions::MessageBundle> message_bundle(
- extensions::file_util::LoadMessageBundle(extension_path, default_locale,
+ is_component ? extensions::file_util::LoadComponentMessageBundle(extension_path,
+ default_locale, error)
+ : extensions::file_util::LoadMessageBundle(extension_path, default_locale,
gzip_permission, error));
if (!message_bundle && !error->empty())
@@ -504,6 +525,42 @@ extensions::MessageBundle* LoadMessageCa
return extensions::MessageBundle::Create(catalogs, error);
}
+extensions::MessageBundle* LoadComponentMessageCatalogs(
+ const base::FilePath& extension_root,
+ const std::string& default_locale,
+ std::string* error) {
+ std::vector<std::string> all_fallback_locales;
+ base::FilePath locale_path(extensions::kLocaleFolder);
+
+ auto* manager =
+ extensions::ExtensionsBrowserClient::Get()->GetComponentExtensionResourceManager();
+
+ GetAllFallbackLocales(default_locale, &all_fallback_locales);
+
+ extensions::MessageBundle::CatalogVector catalogs;
+ for (const auto& fallback_locale : all_fallback_locales) {
+ base::FilePath this_locale_path =
+ locale_path.AppendASCII(fallback_locale)
+ .Append(extensions::kMessagesFilename);
+ int resource_id = 0;
+
+ if (!manager->IsComponentExtensionResource(
+ extension_root, this_locale_path, &resource_id)) {
+ continue;
+ }
+
+ std::optional<base::Value::Dict> catalog = LoadMessageFile(resource_id, error);
+ if (!catalog.has_value()) {
+ return nullptr;
+ }
+
+ catalogs.push_back(std::move(*catalog));
+ }
+
+ return extensions::MessageBundle::Create(
+ catalogs, error);
+}
+
bool ValidateExtensionLocales(const base::FilePath& extension_path,
const base::Value::Dict& manifest,
std::u16string* error) {
--- a/extensions/browser/l10n_file_util.h
+++ b/extensions/browser/l10n_file_util.h
@@ -47,7 +47,8 @@ LoadMessageBundleSubstitutionMapFromPath
const std::vector<base::FilePath>& paths,
const ExtensionId& extension_id,
const std::string& default_locale,
- extension_l10n_util::GzippedMessagesPermission gzip_permission);
+ extension_l10n_util::GzippedMessagesPermission gzip_permission,
+ bool is_component = false);
} // namespace extensions::l10n_file_util
--- a/extensions/browser/l10n_file_util.cc
+++ b/extensions/browser/l10n_file_util.cc
@@ -38,7 +38,8 @@ LoadMessageBundleSubstitutionMapFromPath
const std::vector<base::FilePath>& paths,
const ExtensionId& extension_id,
const std::string& default_locale,
- extension_l10n_util::GzippedMessagesPermission gzip_permission) {
+ extension_l10n_util::GzippedMessagesPermission gzip_permission,
+ bool is_component) {
std::unique_ptr<MessageBundle::SubstitutionMap> return_value =
LoadNonLocalizedMessageBundleSubstitutionMap(extension_id);
@@ -49,8 +50,13 @@ LoadMessageBundleSubstitutionMapFromPath
std::string error;
for (const base::FilePath& path : paths) {
- std::unique_ptr<MessageBundle> bundle(file_util::LoadMessageBundle(
- path, default_locale, gzip_permission, &error));
+ std::unique_ptr<MessageBundle> bundle(
+ is_component
+ ? file_util::LoadComponentMessageBundle(
+ path, default_locale, &error)
+ : file_util::LoadMessageBundle(
+ path, default_locale, gzip_permission, &error));
+
if (bundle) {
for (const auto& iter : *bundle->dictionary()) {
// |insert| only adds new entries, and does not replace entries in
--- a/extensions/common/file_util.h
+++ b/extensions/common/file_util.h
@@ -162,6 +162,11 @@ MessageBundle* LoadMessageBundle(
extension_l10n_util::GzippedMessagesPermission gzip_permission,
std::string* error);
+MessageBundle* LoadComponentMessageBundle(
+ const base::FilePath& extension_root,
+ const std::string& default_locale,
+ std::string* error);
+
// Helper functions for getting paths for files used in content verification.
base::FilePath GetVerifiedContentsPath(const base::FilePath& extension_path);
base::FilePath GetComputedHashesPath(const base::FilePath& extension_path);
--- a/extensions/common/file_util.cc
+++ b/extensions/common/file_util.cc
@@ -605,6 +605,25 @@ MessageBundle* LoadMessageBundle(
return message_bundle;
}
+MessageBundle* LoadComponentMessageBundle(
+ const base::FilePath& extension_root,
+ const std::string& default_locale,
+ std::string* error) {
+ error->clear();
+
+ std::set<std::string> chrome_locales;
+ extension_l10n_util::GetAllLocales(&chrome_locales);
+
+ if (default_locale.empty() || !chrome_locales.contains(default_locale)) {
+ *error = l10n_util::GetStringUTF8(
+ IDS_EXTENSION_LOCALES_NO_DEFAULT_LOCALE_SPECIFIED);
+ return nullptr;
+ }
+
+ return extension_l10n_util::LoadComponentMessageCatalogs(
+ extension_root, default_locale, error);
+}
+
base::FilePath GetVerifiedContentsPath(const base::FilePath& extension_path) {
return extension_path.Append(kMetadataFolder)
.Append(kVerifiedContentsFilename);
--- a/extensions/browser/renderer_startup_helper.cc
+++ b/extensions/browser/renderer_startup_helper.cc
@@ -731,6 +731,18 @@ void RendererStartupHelper::GetMessageBu
paths_to_load.push_back(imported_extension->path());
}
+ bool is_component =
+ extension->location() == extensions::mojom::ManifestLocation::kComponent;
+
+ if (is_component) {
+ auto dictionary_map = l10n_file_util::LoadMessageBundleSubstitutionMapFromPaths(
+ paths_to_load, extension_id, default_locale,
+ extension_l10n_util::GzippedMessagesPermission::kAllowForTrustedSource,
+ is_component);
+ std::move(callback).Run(ToFlatMap(*dictionary_map));
+ return;
+ }
+
// This blocks tab loading. Priority is inherited from the calling context.
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {base::MayBlock()},
@@ -0,0 +1,144 @@
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
@@ -98,9 +98,11 @@ class ManagedValueStoreCache::ExtensionT
// Loads the schemas of the |extensions| and passes a ComponentMap to
// Register().
+ void LoadSchemasOnUIThread(ExtensionSet extensions);
static void LoadSchemasOnFileTaskRunner(ExtensionSet extensions,
base::WeakPtr<ExtensionTracker> self);
- void Register(const policy::ComponentMap* components);
+ void Register(const policy::ComponentMap* components,
+ ExtensionSet extensions);
raw_ptr<Profile> profile_;
policy::PolicyDomain policy_domain_;
@@ -179,6 +181,22 @@ bool ManagedValueStoreCache::ExtensionTr
return extension->manifest()->FindPath(manifest_keys::kStorageManagedSchema);
}
+void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnUIThread(ExtensionSet extensions) {
+ auto components = std::make_unique<policy::ComponentMap>();
+
+ for (const auto& extension : extensions) {
+ if (!Manifest::IsComponentLocation(extension->location())) {
+ continue;
+ }
+
+ (*components)[extension->id()] =
+ StorageSchemaManifestHandler::GetComponentSchema(extension.get())
+ .value_or(policy::Schema());
+ }
+
+ schema_registry_->RegisterComponents(policy_domain_, *components);
+}
+
// static
void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnFileTaskRunner(
ExtensionSet extensions,
@@ -208,14 +226,21 @@ void ManagedValueStoreCache::ExtensionTr
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE, base::BindOnce(&ExtensionTracker::Register, self,
- base::Owned(components.release())));
+ base::Owned(components.release()),
+ std::move(extensions)));
}
void ManagedValueStoreCache::ExtensionTracker::Register(
- const policy::ComponentMap* components) {
+ const policy::ComponentMap* components,
+ ExtensionSet extensions) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
schema_registry_->RegisterComponents(policy_domain_, *components);
+ // Our uBlock Origin component has a policy schema, but is
+ // not anywhere on the actual filesystem - so we need to pull
+ // it out on the UI thread from resources.
+ LoadSchemasOnUIThread(std::move(extensions));
+
// The first SetExtensionsDomainsReady() call is performed after the
// ExtensionSystem is ready, even if there are no managed extensions. It will
// trigger a loading of the initial policy for any managed extensions, and
--- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
+++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
@@ -15,6 +15,8 @@
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "components/policy/core/common/schema.h"
+#include "extensions/browser/extensions_browser_client.h"
+#include "extensions/browser/component_extension_resource_manager.h"
#include "extensions/common/extension.h"
#include "extensions/common/install_warning.h"
#include "extensions/common/manifest.h"
@@ -23,6 +25,7 @@
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/api_permission_set.h"
#include "extensions/common/permissions/permissions_info.h"
+#include "ui/base/resource/resource_bundle.h"
using extensions::manifest_keys::kStorageManagedSchema;
@@ -34,6 +37,33 @@ StorageSchemaManifestHandler::~StorageSc
// static
base::expected<policy::Schema, std::string>
+StorageSchemaManifestHandler::GetComponentSchema(const Extension* extension) {
+ auto* manager =
+ extensions::ExtensionsBrowserClient::Get()->GetComponentExtensionResourceManager();
+ const ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+
+ int resource_id;
+ std::string path;
+ if (const std::string* temp =
+ extension->manifest()->FindStringPath(kStorageManagedSchema)) {
+ path = *temp;
+ } else {
+ return base::unexpected(base::StringPrintf(
+ "%s does not have a schema path", extension->id()));
+ }
+
+ if (!manager->IsComponentExtensionResource(
+ extension->path(), base::FilePath::FromUTF8Unsafe(path), &resource_id)) {
+ return base::unexpected(base::StringPrintf(
+ "%s/%s is not a component extension resource",
+ base::UTF16ToUTF8(extension->path().LossyDisplayName()), path));
+ }
+
+ return policy::Schema::Parse(rb.LoadDataResourceString(resource_id));
+}
+
+// static
+base::expected<policy::Schema, std::string>
StorageSchemaManifestHandler::GetSchema(const Extension* extension) {
std::string path;
if (const std::string* temp =
--- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h
+++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h
@@ -29,6 +29,8 @@ class StorageSchemaManifestHandler : pub
// If the schema is invalid then the Schema returned is invalid too, and
// the failure reason is stored in |error|.
// This function does file I/O and must be called on a thread that allows I/O.
+ static base::expected<policy::Schema, std::string> GetComponentSchema(
+ const Extension* extension);
static base::expected<policy::Schema, std::string> GetSchema(
const Extension* extension);
--- a/chrome/common/extensions/BUILD.gn
+++ b/chrome/common/extensions/BUILD.gn
@@ -82,6 +82,7 @@ source_set("extensions") {
"//components/url_formatter",
"//components/version_info",
"//extensions:extensions_resources",
+ "//extensions/browser",
"//extensions/common",
"//extensions/common:common_constants",
"//extensions/common:core_api_provider",
@@ -89,6 +90,7 @@ source_set("extensions") {
"//extensions/strings",
"//ui/gfx/geometry",
"//ui/message_center/public/cpp",
+ "//ui/base",
"//url",
]
@@ -0,0 +1,150 @@
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -1415,6 +1415,11 @@ inline constexpr char kExtensionCommands
inline constexpr char kPluginsAlwaysOpenPdfExternally[] =
"plugins.always_open_pdf_externally";
+// Boolean indicating that the user has rejected setting
+// the browser as default for an indefinite amount of time.
+inline constexpr char kHeliumDefaultBrowserRejected[] =
+ "helium.browser.default_browser_infobar_rejected";
+
// Int64 containing the internal value of the time at which the default browser
// infobar was last dismissed by the user.
inline constexpr char kDefaultBrowserLastDeclined[] =
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -80,6 +80,8 @@ void RegisterBrowserPrefs(PrefRegistrySi
registry->RegisterIntegerPref(prefs::kDefaultBrowserDeclinedCount, 0);
registry->RegisterTimePref(prefs::kDefaultBrowserFirstShownTime,
base::Time());
+ registry->RegisterBooleanPref(prefs::kHeliumDefaultBrowserRejected, false);
+
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
registry->RegisterTimePref(prefs::kPdfInfoBarLastShown, base::Time());
registry->RegisterIntegerPref(prefs::kPdfInfoBarTimesShown, 0);
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -203,6 +203,11 @@ void AddInfoBarsIfNecessary(BrowserWindo
return;
}
+ PrefService* local_state = g_browser_process->local_state();
+ if (local_state && local_state->GetBoolean(prefs::kHeliumDefaultBrowserRejected)) {
+ return;
+ }
+
base::OnceCallback<void(bool)> default_browser_prompt_shown_callback =
base::DoNothing();
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
--- a/components/infobars/core/confirm_infobar_delegate.h
+++ b/components/infobars/core/confirm_infobar_delegate.h
@@ -84,6 +84,8 @@ class ConfirmInfoBarDelegate : public in
// on the infobar.
virtual int GetLinkSpacingWhenPositionedBeforeButton() const;
+ virtual bool OkButtonShouldAlwaysLead() const;
+
#if BUILDFLAG(IS_IOS)
// Returns whether or not a tint should be applied to the icon background.
// Defaults to true.
--- a/components/infobars/core/confirm_infobar_delegate.cc
+++ b/components/infobars/core/confirm_infobar_delegate.cc
@@ -71,6 +71,10 @@ int ConfirmInfoBarDelegate::GetLinkSpaci
return 0;
}
+bool ConfirmInfoBarDelegate::OkButtonShouldAlwaysLead() const {
+ return false;
+}
+
#if BUILDFLAG(IS_IOS)
bool ConfirmInfoBarDelegate::UseIconBackgroundTint() const {
return true;
--- a/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.cc
@@ -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 {
- return BUTTON_OK;
+ return BUTTON_OK | BUTTON_CANCEL;
}
std::u16string DefaultBrowserInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
- DCHECK_EQ(BUTTON_OK, button);
- return l10n_util::GetStringUTF16(IDS_DEFAULT_BROWSER_INFOBAR_OK_BUTTON_LABEL);
+ DCHECK(button == BUTTON_OK || button == BUTTON_CANCEL);
+ return l10n_util::GetStringUTF16(
+ button == BUTTON_OK ? IDS_DEFAULT_BROWSER_INFOBAR_OK_BUTTON_LABEL
+ : IDS_CARET_BROWSING_DO_NOT_ASK);
}
bool DefaultBrowserInfoBarDelegate::Accept() {
@@ -86,6 +91,22 @@ bool DefaultBrowserInfoBarDelegate::Acce
return ConfirmInfoBarDelegate::Accept();
}
+bool DefaultBrowserInfoBarDelegate::Cancel() {
+ PrefService* local_state = g_browser_process->local_state();
+ if (!local_state) {
+ return true;
+ }
+
+ local_state->SetBoolean(prefs::kHeliumDefaultBrowserRejected, true);
+ ConfirmInfoBarDelegate::InfoBarDismissed();
+
+ return ConfirmInfoBarDelegate::Cancel();
+}
+
bool DefaultBrowserInfoBarDelegate::ShouldHideInFullscreen() const {
return true;
}
+
+bool DefaultBrowserInfoBarDelegate::OkButtonShouldAlwaysLead() const {
+ return true;
+}
--- a/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.h
+++ b/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.h
@@ -47,7 +47,9 @@ class DefaultBrowserInfoBarDelegate : pu
int GetButtons() const override;
std::u16string GetButtonLabel(InfoBarButton button) const override;
bool Accept() override;
+ bool Cancel() override;
bool ShouldHideInFullscreen() const override;
+ bool OkButtonShouldAlwaysLead() const override;
// The WebContents's corresponding profile.
raw_ptr<Profile> profile_;
--- a/chrome/browser/ui/views/infobars/confirm_infobar.cc
+++ b/chrome/browser/ui/views/infobars/confirm_infobar.cc
@@ -222,7 +222,9 @@ void ConfirmInfoBar::Layout(PassKey) {
}
if constexpr (!views::PlatformStyle::kIsOkButtonLeading) {
- std::ranges::reverse(order_of_buttons);
+ if (!GetDelegate()->OkButtonShouldAlwaysLead()) {
+ std::ranges::reverse(order_of_buttons);
+ }
}
for (views::MdTextButton* button : order_of_buttons) {
@@ -0,0 +1,44 @@
--- a/chrome/browser/helium_flag_choices.h
+++ b/chrome/browser/helium_flag_choices.h
@@ -26,6 +26,8 @@ namespace helium {
{kChannelBeta, kChannelCommandLine, kChannelBeta},
};
+ constexpr const char kDisableEchCommandLine[] = "disable-ech";
+
} // namespace helium
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
--- a/chrome/browser/helium_flag_entries.h
+++ b/chrome/browser/helium_flag_entries.h
@@ -11,4 +11,9 @@
"Maximum frame rate for Energy Saver",
"Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.",
kOsDesktop, MULTI_VALUE_TYPE(helium::kEnergySaverFrameRateChoices)},
+ {helium::kDisableEchCommandLine,
+ "Disable ECH (Encrypted Client Hello)",
+ "Disables TLS Encrypted Client Hello. Not recommended unless you live in an area with heavy Internet"
+ " censorship and ECH prevents websites from loading. Helium flag.",
+ kOsAll, SINGLE_VALUE_TYPE(helium::kDisableEchCommandLine)},
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
--- a/chrome/browser/ssl/ssl_config_service_manager.cc
+++ b/chrome/browser/ssl/ssl_config_service_manager.cc
@@ -10,6 +10,7 @@
#include <string_view>
#include <vector>
+#include "base/command_line.h"
#include "base/containers/to_vector.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
@@ -269,6 +270,10 @@ network::mojom::SSLConfigPtr SSLConfigSe
config->ech_enabled = ech_enabled_.GetValue();
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-ech")) {
+ config->ech_enabled = false;
+ }
+
if (post_quantum_enabled_.IsManaged()) {
config->post_quantum_key_agreement_enabled =
post_quantum_enabled_.GetValue();
@@ -9,12 +9,12 @@
])
# If the command finished with a non-zero return code, then report the
@@ -378,7 +378,7 @@ def Main(argv):
@@ -384,7 +384,7 @@ def Main(argv):
# http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html
# BUILD will always be an increasing value, so BUILD_PATH gives us
# something unique that meetings what LS wants.
- 'CFBundleVersion': '@BUILD@.@PATCH@',
+ 'CFBundleVersion': '@MAJOR@.@PATCH@',
+ 'CFBundleVersion': '@MAJOR@.@MINOR@.@BUILD@.@PATCH@',
}
else:
version_format_for_key = {
@@ -43,7 +43,7 @@
return PRODUCT_VERSION;
--- a/chrome/browser/ui/webui/version/version_ui.cc
+++ b/chrome/browser/ui/webui/version/version_ui.cc
@@ -220,6 +220,8 @@ void VersionUI::AddVersionDetailStrings(
@@ -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,
@@ -311,12 +313,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,
@@ -70,7 +70,7 @@
#endif // !BUILDFLAG(IS_ANDROID)
--- a/components/webui/version/version_ui_constants.cc
+++ b/components/webui/version/version_ui_constants.cc
@@ -88,6 +88,7 @@ const char kVariationsName[] = "variatio
@@ -86,6 +86,7 @@ const char kVariationsName[] = "variatio
const char kVariationsSeed[] = "variations_seed";
const char kVariationsSeedName[] = "variations_seed_name";
const char kVersion[] = "version";
@@ -90,7 +90,7 @@
extern const char kVersionProcessorVariation[];
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -39,7 +39,7 @@
@@ -42,7 +42,7 @@
<!-- About Page -->
<message name="IDS_SETTINGS_ABOUT_PAGE_BROWSER_VERSION" desc="The text label describing the version of the browser, example: Version 57.0.2937.0-r123456 (Developer Build) unknown (64-bit). The suffix of the version (eg. '-r123456') exists only in limited cases.)">
@@ -101,7 +101,7 @@
Learn more about fixing update errors
--- a/components/webui/version/resources/about_version.html
+++ b/components/webui/version/resources/about_version.html
@@ -53,11 +53,21 @@ about:version template page
@@ -54,11 +54,21 @@ about:version template page
<table id="inner" cellpadding="0" cellspacing="0" border="0">
<tr><td class="label">$i18n{application_label}</td>
<td class="version" id="version">
@@ -160,3 +160,26 @@
#copy-to-clipboard,
#copy-variations-to-clipboard {
background-color: var(--background-color);
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -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)) {
- UNSAFE_TODO(printf("%s\n", version_info::GetVersionNumber().data()));
+ UNSAFE_TODO(printf("%s\n", version_info::GetHeliumVersionNumber().data()));
return true;
}
#endif
if (command_line.HasSwitch(switches::kVersion)) {
UNSAFE_TODO(printf(
- "%s %s %s\n", version_info::GetProductName().data(),
- version_info::GetVersionNumber().data(),
- chrome::GetChannelName(chrome::WithExtendedStable(true)).c_str()));
+ "%s %s (Chromium %s)\n", version_info::GetProductName().data(),
+ version_info::GetHeliumVersionNumber().data(),
+ version_info::GetVersionNumber().data()));
return true;
}
-12
View File
@@ -1,12 +0,0 @@
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
@@ -9,7 +9,8 @@
"&ecosia",
"&bing",
"&break_stuff_google",
- "&qwant"
+ "&qwant",
+ "&kagi"
]
}
},
@@ -0,0 +1,69 @@
--- a/chrome/browser/helium_flag_choices.h
+++ b/chrome/browser/helium_flag_choices.h
@@ -11,6 +11,15 @@
namespace helium {
using namespace ::helium;
+ constexpr const char kEnergySaverFrameRateCommandLine[] = "energy-saver-fps-limit";
+ constexpr const FeatureEntry::Choice kEnergySaverFrameRateChoices[] = {
+ {flags_ui::kGenericExperimentChoiceAutomatic, "", ""},
+ {"30", kEnergySaverFrameRateCommandLine, "30"},
+ {"60", kEnergySaverFrameRateCommandLine, "60"},
+ {"120", kEnergySaverFrameRateCommandLine, "120"},
+ {"Disabled", kEnergySaverFrameRateCommandLine, "9001"},
+ };
+
} // namespace helium
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
--- a/chrome/browser/helium_flag_entries.h
+++ b/chrome/browser/helium_flag_entries.h
@@ -4,4 +4,8 @@
#ifndef CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
#define CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
+ {helium::kEnergySaverFrameRateCommandLine,
+ "Maximum frame rate for Energy Saver",
+ "Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.",
+ kOsDesktop, MULTI_VALUE_TYPE(helium::kEnergySaverFrameRateChoices)},
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
--- a/chrome/browser/performance_manager/user_tuning/battery_saver_mode_manager.cc
+++ b/chrome/browser/performance_manager/user_tuning/battery_saver_mode_manager.cc
@@ -20,6 +20,7 @@
#include "base/power_monitor/power_observer.h"
#include "base/run_loop.h"
#include "base/scoped_multi_source_observation.h"
+#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "components/performance_manager/freezing/freezing_policy.h"
#include "components/performance_manager/performance_manager_impl.h"
@@ -68,12 +69,28 @@ constexpr int kBatterySaverModeThreshold
constexpr int kBatterySaverModeThresholdAdjustmentForDisplayLevel = 0;
#endif // BUILDFLAG(IS_CHROMEOS)
+int GetMaxRate() {
+ auto* command_line = base::CommandLine::ForCurrentProcess();
+ int fps;
+
+ if (command_line->HasSwitch("energy-saver-fps-limit") &&
+ base::StringToInt(command_line->GetSwitchValueASCII(
+ "energy-saver-fps-limit"), &fps) && fps > 0) {
+ return fps;
+ }
+
+ return 30;
+}
+
class FrameThrottlingDelegateImpl
: public performance_manager::user_tuning::BatterySaverModeManager::
FrameThrottlingDelegate {
public:
void StartThrottlingAllFrameSinks() override {
- content::StartThrottlingAllFrameSinks(base::Hertz(30));
+ static int max_rate = GetMaxRate();
+ if (max_rate < 9000) {
+ content::StartThrottlingAllFrameSinks(base::Hertz(max_rate));
+ }
}
void StopThrottlingAllFrameSinks() override {
@@ -0,0 +1,66 @@
--- a/chrome/browser/helium_flag_choices.h
+++ b/chrome/browser/helium_flag_choices.h
@@ -32,6 +32,8 @@ namespace helium {
constexpr const char kHeliumNoiseCanvasCommandLine[] = "helium-noise-canvas";
constexpr const char kHeliumNoiseAudioCommandLine[] = "helium-noise-audio";
+ constexpr const char kMiddleClickAutoscrollCommandLine[] = "middle-click-autoscroll";
+
} // namespace helium
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
--- a/chrome/browser/helium_flag_entries.h
+++ b/chrome/browser/helium_flag_entries.h
@@ -28,4 +28,8 @@
"[Helium Noise] Jitter audio context data",
"Adds insignificant jitter to audio data to deceive AudioContext-based fingerprinting. Helium flag.",
kOsAll, FEATURE_VALUE_TYPE(blink::features::kHeliumNoiseAudio)},
+ {helium::kMiddleClickAutoscrollCommandLine,
+ "Middle Click Autoscroll",
+ "Enables autoscroll on middle click. Helium flag, Chromium feature.",
+ kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kHeliumMiddleClickAutoscroll)},
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -44,6 +44,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCanvas);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseAudio);
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumMiddleClickAutoscroll);
+
// Controls whether to include information about the page's open popup in
// AIPageContent.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kAIPageContentIncludePopupWindows);
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -19,6 +19,15 @@
namespace blink::features {
+BASE_FEATURE(kHeliumMiddleClickAutoscroll,
+ "HeliumMiddleClickAutoscroll",
+#if BUILDFLAG(IS_WIN)
+ base::FEATURE_ENABLED_BY_DEFAULT
+#else
+ base::FEATURE_DISABLED_BY_DEFAULT
+#endif
+);
+
BASE_FEATURE(kDisableLinkDrag, "DisableLinkDrag", base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kReducedSystemInfo, "ReducedSystemInfo", base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kRemoveClientHints, "RemoveClientHints", base::FEATURE_DISABLED_BY_DEFAULT);
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -1928,9 +1928,9 @@ void WebView::ApplyWebPreferences(const
prefs.default_maximum_page_scale_factor);
#endif
-#if BUILDFLAG(IS_WIN)
- RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled(true);
-#endif
+ RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled(
+ base::FeatureList::IsEnabled(features::kHeliumMiddleClickAutoscroll)
+ );
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
prefs.translate_service_available);
+339 -89
View File
@@ -28,13 +28,13 @@
struct PrepopulatedEngine;
@@ -40,4 +41,5 @@ std::unique_ptr<TemplateURLData> Templat
std::unique_ptr<TemplateURLData> TemplateURLDataFromStarterPackEngine(
const TemplateURLStarterPackData::StarterPackEngine& engine);
const template_url_starter_pack_data::StarterPackEngine& engine);
+TemplateURLData TemplateURLDataFromBang(const Bangs::Bang& bang);
#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_UTIL_H_
--- a/components/search_engines/BUILD.gn
+++ b/components/search_engines/BUILD.gn
@@ -36,6 +36,8 @@ static_library("search_engines") {
@@ -35,6 +35,8 @@ static_library("search_engines") {
"search_terms_data.h",
"template_url.cc",
"template_url.h",
@@ -43,17 +43,17 @@
"template_url_data.cc",
"template_url_data.h",
"template_url_data_util.cc",
@@ -80,6 +82,7 @@ static_library("search_engines") {
@@ -79,6 +81,7 @@ static_library("search_engines") {
"//components/country_codes",
"//components/crash/core/common:crash_key",
"//components/database_utils",
+ "//components/helium_services",
"//components/infobars/core",
"//components/lens:lens",
"//components/lens/proto/server:proto",
"//components/lens:features",
"//components/lens:lens_url_utils",
--- a/components/search_engines/template_url_data_util.cc
+++ b/components/search_engines/template_url_data_util.cc
@@ -13,6 +13,7 @@
@@ -15,6 +15,7 @@
#include "components/search_engines/default_search_manager.h"
#include "components/search_engines/template_url_data.h"
#include "components/search_engines/template_url_starter_pack_data.h"
@@ -61,7 +61,7 @@
#include "third_party/search_engines_data/resources/definitions/prepopulated_engines.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
@@ -510,3 +511,20 @@ std::unique_ptr<TemplateURLData> Templat
@@ -512,3 +513,20 @@ std::unique_ptr<TemplateURLData> Templat
return turl;
}
@@ -84,16 +84,16 @@
+}
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -46,6 +46,8 @@
@@ -39,6 +39,8 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/country_codes/country_codes.h"
+#include "components/helium_services/pref_names.h"
+#include "components/helium_services/helium_services_helpers.h"
#include "components/google/core/common/google_util.h"
#include "components/omnibox/common/omnibox_feature_configs.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
@@ -62,7 +64,9 @@
@@ -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,15 +103,15 @@
#include "components/search_engines/template_url_prepopulate_data.h"
#include "components/search_engines/template_url_prepopulate_data_resolver.h"
#include "components/search_engines/template_url_service_client.h"
@@ -76,6 +80,7 @@
@@ -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"
+#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_util.h"
@@ -489,6 +494,7 @@ class TemplateURLService::PreLoadingProv
#include "url/third_party/mozilla/url_parse.h"
@@ -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,
@@ -501,6 +507,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>()),
@@ -517,11 +525,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>(),
@@ -622,6 +632,10 @@ bool TemplateURLService::ShowInActivesLi
@@ -693,6 +703,10 @@ bool TemplateURLService::ShowInActivesLi
}
bool TemplateURLService::HiddenFromLists(const TemplateURL* t_url) const {
@@ -151,9 +151,9 @@
+ }
+
switch (t_url->policy_origin()) {
case TemplateURLData::PolicyOrigin::kNoPolicy:
// Hide if the preferred search engine for the keyword is created by
@@ -1481,11 +1495,37 @@ void TemplateURLService::Load() {
case TemplateURLData::PolicyOrigin::kDefaultSearchProvider:
return false;
@@ -1526,11 +1540,37 @@ void TemplateURLService::Load() {
if (web_data_service_) {
load_handle_ = web_data_service_->GetKeywords(this);
@@ -164,13 +164,13 @@
}
+void TemplateURLService::LoadBangs() {
+ LOG(ERROR) << "LoadBangs() called";
+ VLOG(2) << "LoadBangs() called";
+ bang_manager_->LoadBangs(url_loader_factory_, prefs_.get(),
+ base::BindOnce(&TemplateURLService::BangsLoadedCallback, base::Unretained(this)));
+}
+
+void TemplateURLService::BangsLoadedCallback() {
+ LOG(INFO) << "BangsLoadedCallback() called";
+ VLOG(2) << "BangsLoadedCallback() called";
+
+ for (const auto& bang : bang_manager_->GetBangs()) {
+ auto template_data = TemplateURLDataFromBang(bang);
@@ -191,9 +191,9 @@
base::CallbackListSubscription TemplateURLService::RegisterOnLoadedCallback(
base::OnceClosure callback) {
return loaded_ ? base::CallbackListSubscription()
@@ -2356,6 +2396,13 @@ void TemplateURLService::Init() {
base::Unretained(this)));
}
@@ -2514,6 +2554,13 @@ void TemplateURLService::Init() {
&TemplateURLService::OnDefaultSearchProviderGUIDChanged,
base::Unretained(this)));
+ helium::ConfigurePrefChangeRegistrarFor(
+ prefs::kHeliumBangsEnabled, pref_change_registrar_,
@@ -220,7 +220,7 @@
#if BUILDFLAG(IS_ANDROID)
#include "base/android/scoped_java_ref.h"
#endif
@@ -146,6 +148,7 @@ class TemplateURLService final : public
@@ -154,6 +156,7 @@ class TemplateURLService final : public
TemplateURLService(
PrefService& prefs,
@@ -228,7 +228,7 @@
search_engines::SearchEngineChoiceService& search_engine_choice_service,
TemplateURLPrepopulateData::Resolver& prepopulate_data_resolver,
std::unique_ptr<SearchTermsData> search_terms_data,
@@ -157,6 +160,7 @@ class TemplateURLService final : public
@@ -165,6 +168,7 @@ class TemplateURLService final : public
// some template URL data.
explicit TemplateURLService(
PrefService& prefs,
@@ -236,7 +236,7 @@
search_engines::SearchEngineChoiceService& search_engine_choice_service,
TemplateURLPrepopulateData::Resolver& prepopulate_data_resolver,
base::span<const TemplateURLService::Initializer> initializers = {});
@@ -476,6 +480,8 @@ class TemplateURLService final : public
@@ -482,6 +486,8 @@ class TemplateURLService final : public
// OnTemplateURLServiceChanged.
void Load();
@@ -245,7 +245,7 @@
// Registers a callback to be called when the service has loaded.
//
// If the service has already loaded, this function does nothing.
@@ -704,6 +710,8 @@ class TemplateURLService final : public
@@ -720,6 +726,8 @@ class TemplateURLService final : public
void Init();
@@ -254,7 +254,7 @@
// Simulate a loaded `TemplateURLService`.
void ApplyInitializersForTesting(
base::span<const TemplateURLService::Initializer> initializers);
@@ -905,6 +913,10 @@ class TemplateURLService final : public
@@ -922,6 +930,10 @@ class TemplateURLService final : public
// Service used to store entries.
scoped_refptr<KeywordWebDataService> web_data_service_;
@@ -267,7 +267,7 @@
// This closure is run when the default search provider is set to Google.
--- /dev/null
+++ b/components/search_engines/template_url_bang_manager.cc
@@ -0,0 +1,174 @@
@@ -0,0 +1,217 @@
+// Copyright 2025 The Helium Authors
+// You can use, redistribute, and/or modify this source code under
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
@@ -277,6 +277,7 @@
+#include <memory>
+#include <string>
+#include <vector>
+#include <map>
+
+#include "base/functional/bind.h"
+#include "base/functional/callback.h"
@@ -316,8 +317,25 @@
+
+BangManager* BangManager::GetInstance() {
+ return base::Singleton<
+ BangManager,
+ base::DefaultSingletonTraits<BangManager>>::get();
+ BangManager,
+ base::DefaultSingletonTraits<BangManager>
+ >::get();
+}
+
+BangCategory BangManager::GetCategoryForBang(size_t index) const {
+ if (auto category = category_map_.find(index - 1); category != category_map_.end()) {
+ return category->second;
+ }
+
+ return BANG_CATEGORY_OTHER;
+}
+
+BangCategory BangManager::GetCategoryFromJSONObject(std::string_view sc) const {
+ if (sc == "ai") {
+ return BANG_CATEGORY_AI;
+ }
+
+ return BANG_CATEGORY_OTHER;
+}
+
+void BangManager::LoadBangs(
@@ -364,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;
+
@@ -383,10 +401,25 @@
+ load_pending_ = false;
+}
+
+std::vector<std::string> FilterTriggers(base::Value::List&& list) {
+ std::vector<std::string> triggers;
+ triggers.reserve(list.size());
+
+ for (auto& value : list) {
+ if (!value.is_string()) {
+ continue;
+ }
+
+ triggers.push_back(std::move(value).TakeString());
+ }
+
+ return triggers;
+}
+
+void BangManager::LoadManifestFromString(const std::string& manifest) {
+ auto parsed = base::JSONReader::ReadAndReturnValueWithError(
+ manifest,
+ base::JSON_ALLOW_COMMENTS
+ base::JSON_ALLOW_COMMENTS | base::JSON_ALLOW_TRAILING_COMMAS
+ );
+
+ if (!parsed.has_value()) {
@@ -408,26 +441,36 @@
+ }
+
+ auto dict = std::move(bang).TakeDict();
+ auto bname = dict.FindString("s");
+ auto bbang = dict.FindString("t");
+ auto burl_template = dict.FindString("u");
+ if (!bname || !bbang || !burl_template) {
+ auto* name = dict.FindString("s");
+ auto* triggers_ptr = dict.FindList("ts");
+ auto* url_template = dict.FindString("u");
+
+ if (!name || !triggers_ptr || !url_template || triggers_ptr->empty()) {
+ continue;
+ }
+
+ auto b_gurl = GURL(*burl_template);
+ if (!b_gurl.is_valid() || !b_gurl.SchemeIsHTTPOrHTTPS()) {
+ LOG(INFO) << "invalid bang url " << *burl_template;
+ auto triggers = FilterTriggers(std::move(*triggers_ptr));
+ auto bang_gurl = GURL(*url_template);
+
+ if (!bang_gurl.is_valid() || !bang_gurl.SchemeIsHTTPOrHTTPS()) {
+ VLOG(2) << "invalid bang url " << *url_template;
+ continue;
+ }
+
+ // We need to pass the URL here as-is, because otherwise URLs
+ // which have the template in the path will have it %-encoded,
+ // which will break everything.
+ bangs_.emplace_back(index++, *bname, *bbang, *burl_template);
+ auto category = dict.FindString("sc");
+
+ for (auto&& trigger : std::move(triggers)) {
+ if (category) {
+ category_map_[index] = GetCategoryFromJSONObject(*category);
+ }
+
+ // We need to pass the URL here as-is, because otherwise URLs
+ // which have the template in the path will have it %-encoded,
+ // which will break everything.
+ bangs_.emplace_back(index++, *name, std::move(trigger), *url_template);
+ }
+ }
+
+ LOG(INFO) << bangs_.size() << " bangs loaded";
+ if (!callbacks_.empty()) {
+ auto callbacks = std::move(callbacks_);
+ for (auto& cb : callbacks) {
@@ -444,17 +487,18 @@
+
--- /dev/null
+++ b/components/search_engines/template_url_bang_manager.h
@@ -0,0 +1,65 @@
@@ -0,0 +1,75 @@
+// 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_SEARCH_ENGINES_BANG_PROVIDER_H_
+#define COMPONENTS_SEARCH_ENGINES_BANG_PROVIDER_H_
+#ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_BANG_MANAGER_H_
+#define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_BANG_MANAGER_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+#include <map>
+
+#include "base/memory/weak_ptr.h"
+#include "base/functional/callback.h"
@@ -474,6 +518,11 @@
+ std::string template_url;
+ };
+
+ enum BangCategory {
+ BANG_CATEGORY_OTHER = 0,
+ BANG_CATEGORY_AI,
+ };
+
+ class BangManager {
+ public:
+ static BangManager* GetInstance();
@@ -482,6 +531,8 @@
+ BangManager(const BangManager&) = delete;
+ BangManager& operator=(const BangManager&) = delete;
+
+ BangCategory GetCategoryForBang(size_t index) const;
+
+ void LoadBangs(
+ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
+ PrefService& prefs,
@@ -494,8 +545,9 @@
+ 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;
+
+ // Weak factory for callbacks.
+ base::WeakPtrFactory<BangManager> weak_ptr_factory_{this};
@@ -505,14 +557,15 @@
+ std::vector<Bang> bangs_;
+ bool load_pending_;
+ std::vector<base::OnceClosure> callbacks_;
+ std::map<size_t, BangCategory> category_map_;
+ };
+}
+
+#endif // COMPONENTS_SEARCH_ENGINES_BANG_PROVIDER_H_
+#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_BANG_MANAGER_H_
+
--- a/components/omnibox/browser/autocomplete_input.cc
+++ b/components/omnibox/browser/autocomplete_input.cc
@@ -743,9 +743,9 @@ bool AutocompleteInput::HasHTTPSScheme(c
@@ -740,9 +740,9 @@ bool AutocompleteInput::HasHTTPSScheme(c
// static
AutocompleteInput::FeaturedKeywordMode
AutocompleteInput::GetFeaturedKeywordMode(std::u16string_view text) {
@@ -524,9 +577,57 @@
return FeaturedKeywordMode::kPrefix;
return FeaturedKeywordMode::kFalse;
}
@@ -885,6 +885,7 @@ std::u16string AutocompleteInput::Autoco
const std::u16string& input,
bool trim_leading_whitespace,
std::u16string* remaining_input) {
+ std::u16string_view input_view = input;
// Find end of first token. The AutocompleteController has trimmed leading
// whitespace, so we need not skip over that.
const size_t first_white(input.find_first_of(base::kWhitespaceUTF16));
@@ -893,6 +894,39 @@ std::u16string AutocompleteInput::Autoco
return input; // Only one token provided.
}
+ const size_t first_exclamation(input.find_first_of('!'));
+ if (first_exclamation != std::u16string::npos && first_exclamation != 0) {
+ bool might_be_bang = input_view.substr(first_exclamation - 1)
+ .find_first_of(base::kWhitespaceUTF16) == 0;
+
+ if (might_be_bang) {
+ auto remaining_str = std::u16string(input_view.substr(0, first_exclamation));
+ std::u16string_view bang = input_view.substr(first_exclamation);
+
+ const size_t space_after(
+ input_view.find_first_of(base::kWhitespaceUTF16, first_exclamation)
+ );
+
+ if (space_after != std::string::npos) {
+ bang = bang.substr(0, space_after - first_exclamation);
+ remaining_str += input_view.substr(space_after + 1);
+ } else if (remaining_str.size() > 0) {
+ remaining_str.erase(remaining_str.size() - 1);
+ }
+
+ if (remaining_input != nullptr) {
+ if (trim_leading_whitespace) {
+ size_t offset = remaining_str.find_first_not_of(base::kWhitespaceUTF16);
+ remaining_str.erase(0, offset);
+ }
+
+ *remaining_input = std::move(remaining_str);
+ }
+
+ return std::u16string(bang);
+ }
+ }
+
// Set |remaining_input| to everything after the first token.
if (remaining_input != nullptr) {
const size_t remaining_start =
--- a/components/search_engines/template_url_data.cc
+++ b/components/search_engines/template_url_data.cc
@@ -27,7 +27,7 @@ namespace {
@@ -28,7 +28,7 @@ namespace {
// Returns a GUID used for sync, which is random except for built-in search
// engines. The latter benefit from using a deterministic GUID, to make sure
// sync doesn't incur in duplicates for prepopulated engines.
@@ -535,7 +636,7 @@
// We compute a GUID deterministically given |prepopulate_id| or
// |starter_pack_id|, using an arbitrary base GUID.
std::string guid;
@@ -38,6 +38,9 @@ std::string GenerateGUID(int prepopulate
@@ -39,6 +39,9 @@ std::string GenerateGUID(int prepopulate
} else if (starter_pack_id > 0) {
guid = base::StringPrintf("ec205736-edd7-4022-a9a3-b431fc%06d",
starter_pack_id);
@@ -545,7 +646,7 @@
} else {
guid = base::Uuid::GenerateRandomV4().AsLowercaseString();
}
@@ -117,7 +120,7 @@ TemplateURLData::TemplateURLData(
@@ -118,7 +121,7 @@ TemplateURLData::TemplateURLData(
regulatory_origin(RegulatoryExtensionType::kDefault),
usage_count(0),
prepopulate_id(prepopulate_id),
@@ -554,7 +655,7 @@
preconnect_to_search_url(preconnect_to_search_url),
prefetch_likely_navigations(prefetch_likely_navigations) {
SetShortName(name);
@@ -183,7 +186,7 @@ std::vector<uint8_t> TemplateURLData::Ge
@@ -184,7 +187,7 @@ std::vector<uint8_t> TemplateURLData::Ge
}
void TemplateURLData::GenerateSyncGUID() {
@@ -565,7 +666,7 @@
size_t TemplateURLData::EstimateMemoryUsage() const {
--- a/components/search_engines/template_url_data.h
+++ b/components/search_engines/template_url_data.h
@@ -253,6 +253,9 @@ struct TemplateURLData {
@@ -262,6 +262,9 @@ struct TemplateURLData {
// starter_pack_id > 0.
int starter_pack_id{0};
@@ -577,7 +678,7 @@
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -1682,6 +1682,8 @@ bool TemplateURL::IsBetterThanConflictin
@@ -1759,6 +1759,8 @@ bool TemplateURL::IsBetterThanConflictin
: base::Time(),
// Prefer engines that CANNOT be auto-replaced.
!engine->safe_for_autoreplace(),
@@ -588,9 +689,9 @@
// Favor prepopulated engines over other auto-generated engines.
--- a/components/search_engines/template_url.h
+++ b/components/search_engines/template_url.h
@@ -818,6 +818,8 @@ class TemplateURL {
int starter_pack_id() const { return data().starter_pack_id; }
@@ -848,6 +848,8 @@ class TemplateURL {
starter_pack_id() == template_url_starter_pack_data::kAiMode;
}
+ int bang_id() const { return data().bang_id; }
+
@@ -599,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
@@ -66,6 +66,11 @@ bool ShouldAccessExtensionService(const
@@ -63,6 +63,11 @@ bool ShouldAccessExtensionService(const
prefs.GetBoolean(prefs::kHeliumExtProxyEnabled);
}
@@ -613,9 +714,9 @@
return GetDummyURL();
--- a/components/helium_services/helium_services_helpers.h
+++ b/components/helium_services/helium_services_helpers.h
@@ -18,6 +18,7 @@ const char kHeliumDefaultOrigin[] =
const char kHeliumDummyOrigin[] =
"https://helium-services-are-disabled.qjz9zk";
@@ -20,6 +20,7 @@ const char kHeliumDummyOrigin[] =
bool ShouldAccessServices(const PrefService& prefs);
+COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
@@ -623,50 +724,50 @@
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
@@ -1841,6 +1841,9 @@ void AddPrivacyStrings(content::WebUIDat
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
{"heliumServicesToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
@@ -2205,6 +2205,9 @@ void AddPrivacyStrings(content::WebUIDat
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
+ {"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
+ {"heliumBangsToggleDescription",
+ IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
{"heliumExtProxyToggle",
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
{"heliumExtProxyToggleDescription",
{"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
{"heliumOriginOverrideDescription",
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -2113,6 +2113,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>
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE" desc="Toggle for enabling/disabling of downloading bangs">
+ Allow downloading the !bang list
+ Allow downloading the !bangs list
+ </message>
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading bangs">
+ When enabled, Helium will fetch our list of bangs that help you browse the Internet faster, such as !w or !gh.
+ Helium will fetch a list of bangs that help you browse the Internet faster, such as !w or !gh. When disabled, bangs will not work.
+ </message>
<message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE" desc="Text input for overriding the Helium services server">
Use your own instance of Helium services
</message>
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
@@ -12,6 +12,11 @@
</settings-toggle-button>
<div class="cr-col">
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
@@ -87,6 +87,11 @@
label="$i18n{heliumExtProxyToggle}"
sub-label="$i18n{heliumExtProxyToggleDescription}">
</settings-toggle-button>
+ <settings-toggle-button id="bangToggleButton"
+ pref="{{prefs.helium.services.bangs}}"
+ label="$i18n{heliumBangsToggle}"
+ sub-label="$i18n{heliumBangsToggleDescription}">
+ </settings-toggle-button>
<settings-toggle-button id="extProxyToggleButton"
pref="{{prefs.helium.services.ext_proxy}}"
label="$i18n{heliumExtProxyToggle}"
</cr-collapse>
</div>
</template>
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -173,6 +173,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);
+ registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
@@ -674,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
@@ -347,6 +347,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;
@@ -682,10 +783,10 @@
+ settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
settings_api::PrefType::kString;
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
--- a/components/helium_services/pref_names.h
+++ b/components/helium_services/pref_names.h
@@ -24,6 +24,9 @@ inline constexpr char kHeliumDidOnboardi
@@ -30,6 +30,9 @@ inline constexpr char kHeliumDidOnboardi
inline constexpr char kHeliumExtProxyEnabled[] =
"helium.services.ext_proxy";
@@ -695,3 +796,152 @@
} // namespace prefs
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
--- a/third_party/metrics_proto/omnibox_event.proto
+++ b/third_party/metrics_proto/omnibox_event.proto
@@ -787,6 +787,8 @@ message OmniboxEventProto {
// or tabbing to it.
TOOLBELT = 9; // Select and activate a search shortcuts action
// from the omnibox toolbelt.
+ RETURN_BANG = 10; // Accept a bang at the end of the query by pressing
+ // the Return/Enter key.
}
optional KeywordModeEntryMethod keyword_mode_entry_method = 20;
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -304,6 +304,9 @@ class OmniboxEditModel {
return !is_keyword_hint_ && !keyword_.empty();
}
+ // Accepts the bang at the end of the user query.
+ void MaybeAcceptTrailingBang();
+
// Accepts the current keyword hint as a keyword. `entry_method` indicates how
// the user entered keyword mode.
void AcceptKeyword(
@@ -664,6 +667,10 @@ class OmniboxEditModel {
// triggering is enabled, false otherwise.
bool AllowKeywordSpaceTriggering() const;
+ // Checks whether the user text contains a bang at the end of it
+ // that can be accepted by pressing the Return key.
+ bool HasTrailingBangKeyword() const;
+
// Whether the user just typed a space at the end of a keyword, with or
// without inline autocompletion:
// - 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
@@ -888,6 +888,24 @@ void OmniboxEditModel::OpenSelectionForT
OpenSelection(popup_selection_, timestamp, disposition, via_keyboard);
}
+void OmniboxEditModel::MaybeAcceptTrailingBang() {
+ if (!HasTrailingBangKeyword()) {
+ return;
+ }
+
+ AcceptKeyword(OmniboxEventProto::RETURN_BANG);
+
+ const AutocompleteResult& result = autocomplete_controller()->result();
+ for (size_t i = 0; i < result.size(); i++) {
+ const AutocompleteMatch& match = result.match_at(i);
+
+ if (input_.text() == match.fill_into_edit) {
+ SetPopupSelection(OmniboxPopupSelection(i));
+ return;
+ }
+ }
+}
+
void OmniboxEditModel::AcceptKeyword(
OmniboxEventProto::KeywordModeEntryMethod entry_method) {
TRACE_EVENT0("omnibox", "OmniboxEditModel::AcceptKeyword");
@@ -896,6 +914,17 @@ void OmniboxEditModel::AcceptKeyword(
controller_->StopAutocomplete(/*clear_result=*/false);
+ const TemplateURL* turl =
+ controller_->client()->GetTemplateURLService()->GetTemplateURLForKeyword(
+ keyword_);
+
+ if (turl && turl->bang_id() > 0 && !user_text_.starts_with(u'!')) {
+ AutocompleteMatch match = CurrentMatch();
+ if (match.fill_into_edit.length() > user_text_.length()) {
+ user_text_ = match.fill_into_edit;
+ }
+ }
+
SetIsKeywordHint(false);
keyword_mode_entry_method_ = entry_method;
if (original_user_text_with_keyword_.empty()) {
@@ -938,9 +967,6 @@ void OmniboxEditModel::AcceptKeyword(
}
base::RecordAction(base::UserMetricsAction("AcceptedKeywordHint"));
- const TemplateURL* turl =
- controller_->client()->GetTemplateURLService()->GetTemplateURLForKeyword(
- keyword_);
EmitEnteredKeywordModeHistogram(entry_method, turl, !user_text_.empty());
}
@@ -2804,6 +2830,21 @@ bool OmniboxEditModel::AllowKeywordSpace
return GetPrefService()->GetBoolean(omnibox::kKeywordSpaceTriggeringEnabled);
}
+bool OmniboxEditModel::HasTrailingBangKeyword() const {
+ if (!is_keyword_hint_ || input_.InKeywordMode()
+ || !keyword_.starts_with('!')
+ || !AutocompleteMatch::IsSearchType(current_match_.type)
+ || !GetText().ends_with(keyword_)) {
+ return false;
+ }
+
+ const TemplateURL* turl =
+ controller_->client()->GetTemplateURLService()->GetTemplateURLForKeyword(
+ keyword_);
+
+ return turl && turl->bang_id() > 0;
+}
+
bool OmniboxEditModel::ShouldAcceptKeywordAfterInsertingSpaceAtEnd(
const std::u16string& new_text) {
// Check if the user has disabled space triggering.
@@ -2827,16 +2868,20 @@ bool OmniboxEditModel::ShouldAcceptKeywo
return false;
}
- // `input` must end with space. Typing 'youtube' shouldn't enter
- // keyword mode until the user types a final space.
- if (!IsSpaceCharForAcceptingKeyword(new_text[new_text.length() - 1])) {
+ // Parse the keyword from the input so bang keywords in the middle or at the
+ // end are accepted when the trailing space is typed.
+ std::u16string trimmed_text(
+ base::TrimWhitespace(new_text, base::TRIM_LEADING));
+ const std::u16string new_keyword = base::ToLowerASCII(
+ AutocompleteInput::SplitKeywordFromInput(trimmed_text, false, nullptr));
+
+ if (new_keyword != keyword_) {
return false;
}
- // Check the rest of the input matches `keyword`. This isn't necessary,
- // `AutocompleteController` shouldn't show keyword hints on the default match
- // for inputs like 'yout '. But that's not a guarantee.
- if (new_text.substr(0, new_text.length() - 1) != keyword_) {
+ // `input` must end with space. Typing 'youtube' shouldn't enter
+ // keyword mode until the user types a final space.
+ if (!IsSpaceCharForAcceptingKeyword(new_text[new_text.length() - 1])) {
return false;
}
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -2015,6 +2015,7 @@ bool OmniboxViewViews::HandleKeyEvent(vi
metric_value);
if (controller()->IsPopupOpen() && !control) {
// Normal case of pressing <return> when the popup is open.
+ controller()->edit_model()->MaybeAcceptTrailingBang();
controller()->edit_model()->OpenSelection(
controller()->edit_model()->GetPopupSelection(), event.time_stamp(),
disposition,
@@ -0,0 +1,101 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -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"
+#include "chrome/browser/channel_selection.h"
#include "chrome/browser/devtools/features.h"
#include "chrome/browser/flag_descriptions.h"
#include "chrome/browser/login_detection/login_detection_util.h"
--- /dev/null
+++ b/chrome/browser/channel_selection.cc
@@ -0,0 +1,28 @@
+// Copyright 2025 The Helium Authors
+// You can use, redistribute, and/or modify this source code under
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
+
+#include <string>
+
+#include "base/command_line.h"
+#include "chrome/browser/channel_selection.h"
+
+namespace helium {
+
+std::string GetSelectedChannel() {
+ auto* command_line = base::CommandLine::ForCurrentProcess();
+
+ if (command_line->HasSwitch(kChannelCommandLine)) {
+ std::string override_channel =
+ command_line->GetSwitchValueASCII(kChannelCommandLine);
+
+ if ((override_channel == kChannelStable) ||
+ (override_channel == kChannelBeta)) {
+ return override_channel;
+ }
+ }
+
+ return kChannelStable;
+}
+
+} // namespace helium
--- /dev/null
+++ b/chrome/browser/channel_selection.h
@@ -0,0 +1,19 @@
+// Copyright 2025 The Helium Authors
+// You can use, redistribute, and/or modify this source code under
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHANNEL_SELECTION_H_
+#define CHROME_BROWSER_CHANNEL_SELECTION_H_
+
+#include <string>
+namespace helium {
+
+constexpr const char kChannelCommandLine[] = "helium-update-channel";
+
+constexpr const char kChannelStable[] = "stable";
+constexpr const char kChannelBeta[] = "beta";
+
+std::string GetSelectedChannel();
+
+} // namespace helium
+#endif /* CHROME_BROWSER_CHANNEL_SELECTION_H_ */
--- a/chrome/browser/helium_flag_choices.h
+++ b/chrome/browser/helium_flag_choices.h
@@ -20,6 +20,12 @@ namespace helium {
{"Disabled", kEnergySaverFrameRateCommandLine, "9001"},
};
+ constexpr const FeatureEntry::Choice kChannelChoices[] = {
+ {flags_ui::kGenericExperimentChoiceAutomatic, "", ""},
+ {kChannelStable, kChannelCommandLine, kChannelStable},
+ {kChannelBeta, kChannelCommandLine, kChannelBeta},
+ };
+
} // namespace helium
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
--- a/chrome/browser/helium_flag_entries.h
+++ b/chrome/browser/helium_flag_entries.h
@@ -4,6 +4,9 @@
#ifndef CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
#define CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
+ {helium::kChannelCommandLine,
+ "Update channel", "Selects which update channel to use for update checking. Helium flag.",
+ kOsAll, MULTI_VALUE_TYPE(helium::kChannelChoices)},
{helium::kEnergySaverFrameRateCommandLine,
"Maximum frame rate for Energy Saver",
"Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.",
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -263,6 +263,8 @@ static_library("browser") {
"browsing_topics/browsing_topics_service_factory.h",
"chained_back_navigation_tracker.cc",
"chained_back_navigation_tracker.h",
+ "channel_selection.cc",
+ "channel_selection.h",
"child_process_host_flags.h",
"chrome_browser_field_trials.cc",
"chrome_browser_field_trials.h",

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