Chromium change:
https://source.chromium.org/chromium/chromium/src/+/39a3c857cf68cd462f911d6f251f05d1996a485e
commit 39a3c857cf68cd462f911d6f251f05d1996a485e
Author: Andrea Orru <andreaorru@chromium.org>
Date: Wed Mar 4 12:56:29 2026 -0800
[Extensions] Track service worker lifecycle more precisely
This change resolves multiple issues with extensions service workers.
- Adds `RendererState::kInitialized` to `ServiceWorkerState` to track
when an extension service worker has initialized but has not yet
finished executing its top-level JavaScript.
- Previously, `OnStoppingSync` and `OnStoppedSync` calls were discarded
if they occurred before the worker finished starting. Now,
`ServiceWorkerTaskQueue::OnWorkerStop` is executed for service workers
that stopped during their start process, allowing `ProcessManager` to
successfully clean up stale workers from its tracking set.
- Plumbs `blink::ServiceWorkerToken` through service worker lifecycle
IPCs to uniquely identify specific worker instances. This enables
`ServiceWorkerState` to verify if incoming IPC messages belong to a live
worker instance via the new `IsLiveServiceWorkerWithToken` method.
Bug: 40936639
Privacy team says it's a privacy concern any more and is ok with this
feature being enabled.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/418a56df178e5b23da11a7b87d1fd57ad9807f37
commit 418a56df178e5b23da11a7b87d1fd57ad9807f37
Author: Thomas Nguyen <tungnh@chromium.org>
Date: Fri Feb 13 14:35:47 2026 -0800
[PEPC] Remove generic <permission> element
This CL removes the implementation of the generic <permission> element and the PermissionElement runtime feature. The specific elements <geolocation>, <usermedia>, and <install> are now supported by HTMLCapabilityElementBase and their respective subclasses.
Bug: 448593977
Change-Id: I7407b93e80b4ee8f7e21b45d3a8ecd1c83556714
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7404142
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584922}
Add support for linking Brave Origin subscriptions after purchase on
Android, following the same link-order flow used by Leo (AI Chat).
- Add OriginIAPSubscription Mojo interface and C++ implementation to
read purchase token/order ID from prefs and persist link status
- Handle product=origin in SubscriptionRenderFrameObserver: inject
braveOrigin.receipt and braveOrigin.orderId into localStorage on
the initial landing page, and linkResult.setStatus() callback on
the /order-link/ result page
- Register OriginIAPSubscription Mojo binding in
BraveContentBrowserClient
- Update LinkSubscriptionUtils to use link-order intent for Origin
- Hide Purchase section in Origin preferences when already linked
- Move subscription_render_frame_observer.h include out of
ENABLE_BRAVE_VPN guard so it is available for all Android
subscription products
- Generalize Leo-specific constants (kIntentParamValueLeo,
kResultLandingPagePathLeo) since they are now shared with Origin
- Add Origin test cases to browser tests
Resolves: https://github.com/brave/brave-browser/issues/53613
Resolvesbrave/brave-browser#52043
Update each account-based keyring to accept a unary predicate that can be used
to match public account keys against the OFAC sanctions list.
This change does IWYU additions for all cases where `base::DoNothing` is
used. Furthermore, this change removes some of the uses of
`base::DoNothing` as an argument default value in a header, removing the
need to add `callback_helpers.h` to those headers.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e8436cccafc34d6e4d9c060f682345060579d208https://chromium.googlesource.com/chromium/src/+/227f058d9b9e27370a64b34046d71b9f23106409
commit e8436cccafc34d6e4d9c060f682345060579d208
Author: Lei Zhang <thestig@chromium.org>
Date: Fri Dec 12 15:16:22 2025 -0800
Forward declare base::ScopedClosureRunner in some Blink headers
Avoid including base/functional/callback_helpers.h when not needed. Also
use base/functional/callback_forward.h since callback_helpers.h was
providing callback.h. For scrollable_area.h, make this possible by
getting rid the default arguments to PerformSnapping(),
SnapAtCurrentPosition(), and SnapForEndPosition(). These methods have
very few callers, so just pass in all the arguments. Then do IWYU to fix
the build.
Change-Id: I5cfd017bd6f392b0d97e99c41d4885fac7140a4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7254408
Commit-Queue: Philip Rogers <pdr@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Christoph Schwering <schwering@google.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1558318}
commit 227f058d9b9e27370a64b34046d71b9f23106409
Author: Lei Zhang <thestig@chromium.org>
Date: Thu Dec 11 21:30:12 2025 -0800
Do IWYU for callback_helpers.h in async_dom_storage_database.cc
Add callback_helpers.h for base::DoNothing() usage. The transitive
include that makes this work as-is will be deleted in the near future.
Change-Id: Id5ba6db705434734a854874923b7bb196392ca6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7253640
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1557849}
* Add enable_brave_wallet GN variable and build flag
This adds a new GN build flag 'enable_brave_wallet' that can be set to
false to exclude Brave Wallet from the build. The flag is true by default
to maintain current behavior.
Changes include:
- Add enable_brave_wallet declare_args in build/config/BUILDCONFIG.gn
- Create brave_wallet/common/buildflags with ENABLE_BRAVE_WALLET flag
- Update all BUILD.gn and sources.gni files to use the new flag
- Add wallet buildflags dependencies via minimal one-line imports
* Add patches for wallet buildflags in Chromium BUILD files
Adds minimal one-line patches to import wallet buildflags dependencies
in Chromium source files. This allows Chromium code to conditionally
depend on wallet headers.
Patches:
- chrome/browser/ui/hid/BUILD.gn
- net/BUILD.gn
- third_party/blink/common/BUILD.gn
- third_party/blink/public/common/BUILD.gn
- third_party/blink/renderer/modules/permissions/BUILD.gn
* Guard wallet code in Chromium source overrides
Updates chromium_src overrides to conditionally compile wallet-related
code based on enable_brave_wallet flag. This includes:
- Adding DEPS files to allow buildflags dependencies
- Guarding wallet permission handling with #if BUILDFLAG(ENABLE_BRAVE_WALLET)
- Keeping wallet permission enum values unconditionally to maintain profile
interchangeability between wallet-enabled and wallet-disabled builds
- Updating component registration and preference handling
Key changes:
- Permission enums remain stable across build configs for UMA and persistence
- Wallet permission handling code only compiled when wallet enabled
- DEPS files updated to allow buildflags includes
* Guard wallet UI code in front-end TypeScript and Mojom
Conditionally compiles wallet-related UI code in TypeScript and Mojom
interfaces based on enable_brave_wallet preprocessor flag.
Changes:
- Settings menu: Use lastInserted pattern for menu item ordering
- Page visibility: Guard wallet page visibility checks
- Browser commands: Guard wallet command handling
- Routes: Conditionally include wallet routes
- Add non-null assertions for DOM insertions in TypeScript
- Update Mojom interfaces to conditionally include wallet enums
Front-end code uses <if expr="enable_brave_wallet"> preprocessor
directives to exclude wallet UI when the feature is disabled.
* Guard wallet usage in non-wallet Brave code
Conditionally compiles wallet-related code in non-wallet Brave files
based on enable_brave_wallet build flag.
Changes include:
- browser/: Guard wallet service factories, preferences, and helpers
- components/: Guard wallet dependencies in rewards, sidebar, and DNS
- renderer/: Conditionally register wallet content settings
- utility/: Guard wallet component registration
- ios/: Add optional chaining for wallet feature flags
- test/: Guard wallet-related test code
Key files:
- brave_stats_updater.cc: Guard wallet pref registration with #if
- brave_profile_prefs.cc: Conditionally register wallet preferences
- sidebar_service.cc: Guard wallet panel items
- iOS WalletConstants.swift: Use optional chaining for feature checks
This allows building Brave without wallet while maintaining profile
compatibility between wallet-enabled and wallet-disabled builds.
* Add static_assert for ENABLE_BRAVE_WALLET in wallet headers
Adds compile-time assertions to wallet headers to ensure they are only
included when wallet is enabled. This prevents accidental usage of wallet
APIs when enable_brave_wallet=false.
Added static_assert(BUILDFLAG(ENABLE_BRAVE_WALLET)) to:
browser/brave_wallet/ (11 files):
- asset_ratio_service_factory.h
- brave_wallet_context_utils.h
- brave_wallet_ipfs_service_factory.h
- brave_wallet_provider_delegate_impl.h
- brave_wallet_service_factory.h
- brave_wallet_tab_helper.h
- meld_integration_service_factory.h
- wallet_notification_service_factory.h
- simulation_service_factory.h
- swap_service_factory.h
- wallet_data_files_installer_delegate_impl.h
components/brave_wallet/browser/ (15 files):
- brave_wallet_p3a_private.h
- brave_wallet_prefs.h
- brave_wallet_service.h
- brave_wallet_utils.h
- ens_resolver_task.h
- json_rpc_service_test_utils.h
- json_rpc_service.h
- keyring_service_observer_base.h
- keyring_service.h
- network_manager.h
- permission_utils.h
- pref_names.h
- test_utils.h
- tx_service.h
- wallet_data_files_installer.h
components/brave_wallet/common/ (6 files):
- brave_wallet_types.h
- common_utils.h
- eth_abi_utils.h
- features.h
- hex_utils.h
- pref_names.h
Also includes minor wallet code updates to use buildflags and
guard zcash-specific test code.
* Follow up fixes after Parts 1-7
This migration has been effected in upstream, but several places in our
codebase got broken by this transition. This change makes several parts
of our codebase more friendly to passing `string_view`.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0e1784e3cf990560b173f40338e582f50aba0e85
commit 0e1784e3cf990560b173f40338e582f50aba0e85
Author: Charlie Harrison <csharrison@chromium.org>
Date: Fri Oct 3 11:04:26 2025 -0700
RELAND: Migrate GURL::path() and friends to return string_view
This relands crrev.com/c/7003625. Missing cases were found by staring
at the output of `git grep` for the whole codebase.
Origin description:
Also migrates some last remaining callers of the std::string APIs.
This completes phase 1 of crbug.com/448174617.
Bug: 448174617
Change-Id: I7f24f81d1fbf129d8b0dd94f4cf948626deab933
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7007010
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1524878}
* Add AI Chat build flag to components/ai_chat
* Add AI Chat build flag to browser/ui
* Add AI Chat build flag to browser/resources
* Add AI Chat build flag to chromium overrides
* Add AI Chat build flag to other components
* Add AI Chat build flag to core browser files
* Add AI Chat build flag to app and renderer
* Add AI Chat build flag to remaining files
* Set enable_ai_chat to !is_brave_origin_branded
* Review comments
Including gn_check errors in chromium_src
* Exclude ai_chat Jest tests when not enabled
- Everything in `browser` moves to `content/browser`
- Everything in `renderer` moves to `content/renderer`
- Everything in `common` moves to `core/common`
- `pref_names.h` moved into `core/common`
- Fixed copyright notice in `playlistSelect.tsx`
Rename pref/features to try to make them more clear. `Enable` means that the site will open in Speedreader automatically. `Allow` means it may open in Speedreader depending on whether it's a site specific override or allow for all readable urls is true and the url looks readable.
This function used to be in the global namespace.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/7ce73baa09400dc405a9cf925bbce1908457387e
commit 7ce73baa09400dc405a9cf925bbce1908457387e
Author: Wangsong Jin <wangsongjin@microsoft.com>
Date: Thu Aug 14 10:02:58 2025 -0700
Improve third-party NTPs creation performance by using spare renderer
The current implementation of the third-party NTPs in the browser does
not make use of the spare renderer. As a result, third-party search
engine NTPs that depend on the current architecture experience delays
because they have to create a new process rather than reusing an
existing spare renderer.
This change primarily updates three parts. First, we have to late-bind
the instant process flag. Currently, the flag is passed as a
command-line switch when the process is created, which prevents spare
renderers from attaching the instant process flag as spare renderers
doesn't know if it's instant process at that moment. To address this
issue, we introduce a new method, SetConfigurationOnProcessLockUpdate(),
in the existing RendererConfiguration mojom interface. This method is
called in NotifyRendererOfLockedStateUpdate() to late bind the instant
process flag when process lock is updated. Additionally, we reuse
process_state.cc to store and expose the instant process setting.
The 2nd part of the change aims to enable the instant process to utilize
the spare renderer. We introduced a feature flag,
kInstantUsesSpareRenderer, to serve as the experimental control flag.
Additionally, we updated ChromeContentBrowserClient::IsSuitableHost() to
bypass the check if the spare renderer is taken by the instant process.
We made this change because InstantService::AddInstantProcess is called
after RenderProcessHostImpl::MayReuseAndIsSuitable() check in
RenderProcessHostImpl::GetProcessHostForSiteInstance(), which could hit
the "Unsuitable process reused for site" NOTREACHED.
The third part is to ensure that the renderer security settings are
passed to the process in time, before the renderer thread is created.
However, the order of mojo calls is not guaranteed on non-associated
interfaces in service worker cases. Therefore, we add
WaitForProcessReady() to make the service worker creation thread wait
until the renderer configuration (instant flag) and other
security-related settings are set before attempting to create the
worker.
Bug: 398159675
Change-Id: Ib7c3a7ca1bedae9174cd415e313ef43cfaf06b7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6373046
Commit-Queue: Wangsong Jin <wangsongjin@microsoft.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1501448}
This field has been made private and matchers have been provided to
support the cases where the check if for the error condition.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c28317921afe79d71fdc07444288b8d07b990aea
commit c28317921afe79d71fdc07444288b8d07b990aea
Author: Chris Fredrickson <cfredric@chromium.org>
Date: Sun Jul 27 14:18:43 2025 -0700
Make EvalJsResult::error private
Making this field private will allow us to more easily change its name,
and/or change the internal representation of the class (e.g. use a
std::variant instead of holding *both* the success and error values),
and define move ctor/assignment ops without allowing callers to violate
the invariants of the class.
Bug: 431787497
Change-Id: I91d856c6df9442e896a21268eee80a455e755063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6788313
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1492549}
This type's interface has been further simplified, and it does not offer
a separate value member anymore. This change corrects many places in our
codebase where this had to be corrected.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/94e8c33dee33477ef4c13a2573d0c32d727be1e8
commit 94e8c33dee33477ef4c13a2573d0c32d727be1e8
Author: Chris Fredrickson <cfredric@chromium.org>
Date: Mon Jul 14 18:57:33 2025 -0700
Convert EvalJsResult to class and make value_ private
This makes it harder to accidentally use EvalJsResult incorrectly (e.g.
accessing `value` without checking for errors first). It also allows
EvalJsResult to enforce its invariant (that `value.is_none()` if
`!error.empty()`) without requiring `value` to be const.
Change-Id: Idc90f48e3f2d4880e82023b48c42e3f3b9794f7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6732142
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1486687}
This PR runs a mechanical change to do IWYU on all files using the new
abseil functions, while also removing the old header inclusions for
`base::StringPrintf`.
A presubmit `BanRule` is also being added for the `base::` functions.
Resolves https://github.com/brave/brave-browser/issues/48143
This PR is the run of `gn format` on all `gn` files. This is a
mechanical change done with:
```sh
git ls-files -- "*.gn" | xargs gn format
git ls-files -- "*.gni" | xargs gn format
```
This change has been motivated primarily by an improvement to the
formatters privided by `gn` correcting cases of redundant target naming,
i.e cases where `//foo:foo` is used, and should just be `//foo`.
For this particular `gn` change, see:
https://chromium.googlesource.com/chromium/src/+/c822490a82cdb6ad479159683a92858f7c6f0a58
Resolves https://github.com/brave/brave-browser/issues/48161
This PR has additional replacements for base::StringPrintf with the
underlying abseil implementation absl::StrFormat.
This is mostly a mechanical change.
Resolves https://github.com/brave/brave-browser/issues/48076
This PR does IWYU for the following files:
- base/strings/utf_string_conversions.h
- base/i18n/number_formatting.h
This is a mechanical change, and for more details, check the issue
description.
Resolves https://github.com/brave/brave-browser/issues/47060
Files that use functions from `string_util.h` should include that header
directly instead of relying on transient inclusions.
This is a mechanical change using this script:
```sh
remove_header_if_unused() {
files=$(git grep -l "base/strings/string_util.h")
for file in $files; do
if ! git grep -qE "base::MakeStringPiece|base::MakeWStringView|base::ToLowerASCII|base::ToUpperASCII|base::CompareCaseInsensitiveASCII|base::EqualsCaseInsensitiveASCII|base::EmptyString|base::RemoveChars|base::ReplaceChars|base::TrimPositions|base::TrimString|base::TruncateUTF8ToByteSize|base::TrimWhitespace|base::CollapseWhitespace|base::ContainsOnlyChars|base::IsStringUTF8|base::IsStringASCII|base::EqualsASCII|base::CompareCase|base::StartsWith|base::EndsWith|base::RemovePrefix|base::RemoveSuffix|base::IsAscii|base::IsUnicodeControl|base::IsHexDigit|base::IsUnicodeWhitespace|base::FormatBytesUnlocalized|base::ReplaceFirstSubstringAfterOffset|base::ReplaceSubstringsAfterOffset|base::WriteInto|base::JoinString|base::ReplaceStringPlaceholders|base::MakeStringViewWithNulChars" "$file"; then
sed -i '/base\/strings\/string_util.h/d' "$file"
echo "Removed 'base/strings/string_util.h' from $file"
fi
done
}
add_header_if_needed() {
files=$(git grep -lE "base::MakeStringPiece|base::MakeWStringView|base::ToLowerASCII|base::ToUpperASCII|base::CompareCaseInsensitiveASCII|base::EqualsCaseInsensitiveASCII|base::EmptyString|base::RemoveChars|base::ReplaceChars|base::TrimPositions|base::TrimString|base::TruncateUTF8ToByteSize|base::TrimWhitespace|base::CollapseWhitespace|base::ContainsOnlyChars|base::IsStringUTF8|base::IsStringASCII|base::EqualsASCII|base::CompareCase|base::StartsWith|base::EndsWith|base::RemovePrefix|base::RemoveSuffix|base::IsAscii|base::IsUnicodeControl|base::IsHexDigit|base::IsUnicodeWhitespace|base::FormatBytesUnlocalized|base::ReplaceFirstSubstringAfterOffset|base::ReplaceSubstringsAfterOffset|base::WriteInto|base::JoinString|base::ReplaceStringPlaceholders|base::MakeStringViewWithNulChars")
for file in $files; do
../tools/add_header.py --header '"base/strings/string_util.h"' "$file"
done
}
remove_header_if_unused
add_header_if_needed
```
Resolves https://github.com/brave/brave-browser/issues/46559
There was a flag from long ago that allowed you to select Crypto Wallets as your wallet. However if you did this, it no longer works. There is no one that can feasibly still be using this wallet because it hasn't worked for many versions
Addressed review comments
Remove references to 21070F3D60711361C1210B870439BE49B5D995F4
21070F3D60711361C1210B870439BE49B5D995F4 is for Ethereum Remote Client which is removed
Remove unused ReinstallAsNonComponent
Remove unused comment IsInstallationExplicitlyAllowed
Remove _permission_features.json because it's an override that only
exists because of CW extension.
Remove unused string braveWalletImportFromLegacy
Use constexpr for kMetamaskExtensionId
Remove need subscription to kDefaultEthereumWallet and OnWalletTypeChanged handler
Remove DISABLED_ImportLegacyWallet
Add Migration for people with CryptoWallets pref
Deprecate and keep CryptoWallets prefs
1
Upstream has abandoned its in-house implementation of `base::ranges`,
and all cases now merely alias back to the upstream implementation. This
has caused some build failures, as in certain cases the implementation
in `base` didn't quite match what was being done in `std`.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/7be06d9af3db3b022636d5f597353d9d89207427
commit 7be06d9af3db3b022636d5f597353d9d89207427
Author: Peter Kasting <pkasting@chromium.org>
Date: Thu Jan 23 12:33:52 2025 -0800
Make base::ranges equivalent to std::ranges.
This prevents backsliding while rewriting the codebase to explicitly
spell the latter.
Bug: 386918226
Resolves https://github.com/brave/brave-browser/issues/43566
Use `constexpr` strings
This PR changes moves away from uses of `const char` with two
approaches. For `.cc` files, these types are turned into constexpr ones,
which gives the compiler more leeway for optimisations.
For the constants on header files, we are converting these instances to
`inline constexpr`, in order to also reduce string duplication across
the binary.
This change was generated with a tool.
`ChromeRenderThreadObserver` doesn't have `is_incognito_process()`
anymore, and the state should be returned from
`chrome::IsIncognitoProcess()`.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/22e259a86b120391897efb3034d2b7a508ff608b
commit 22e259a86b120391897efb3034d2b7a508ff608b
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Thu Aug 29 00:46:11 2024 +0000
Add a separate "process_state" file and target in //chrome/renderer
Currently, whether a process is incognito is stored on the
ChromeRenderThreadObserver. This is not ideal since,
1) It has nothing to do with observing the render thread, and
2) Anything that needs to check whether a process is incognito then
needs to depend on ChromeRenderThreadObserver, which can make
cyclical dependencies when trying to extract out pieces from
the monolithic //chrome/renderer BUILD file.
Fix this by pulling the tracking for is_incognito_process into a new
file, process_state.h, which is in its own source set,
//chrome/renderer:process_state.
This CL should have no effective behavior change.
Bug: None
This argument has been added to the end of the arglist, and to the use
in brave's codebase, it just gets passed along.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b495c98dc50ae6a601527ff3f957c6c8397232e1
commit b495c98dc50ae6a601527ff3f957c6c8397232e1
Author: Justin Lulejian <jlulejian@chromium.org>
Date: Wed Aug 14 15:48:05 2024 +0000
[ServiceWorker] Populate service worker start token to WorkerId.
Before this change the //extensions layer had no access to the
blink::ServiceWorkerToken. This token tracks a worker from start until
stop, which is very important for. Of note, this token is different than
the `activation_token` in extensions::ServiceWorkerTaskQueue. That token
tracks extension activation and deactivation, but is stable across
worker start/stops.
This supports two things:
1) Refactoring extensions::WorkerId to track worker start/stop by the
worker token instead of by the combination of render process id +
thread id (which is fragile)
2) crrev.com/c/5585866 since now the WorkerId will have a token to
compare for removal of stopped workers from //extensions tracking
Low-Coverage-Reason: TRIVIAL_CHANGE content_renderer_client.h only has trivial argument passing changes.
Bug: 40936639