These classes were hoisted and renamed. This has been replaced in
Chromium as well. This is a mechanical change for Brave, done with the
following script.
```
git grep -lw 'Value::List' | xargs sed -i 's/\bValue::List\b/ListValue/g'
git grep -lw 'Value::Dict' | xargs sed -i 's/\bValue::Dict\b/DictValue/g'
git cl format
```
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/6bc468d481835992696083e99e556516fb7f5f80
```
commit 6bc468d481835992696083e99e556516fb7f5f80
Author: Avi Drissman <avi@chromium.org>
Date: Thu Jan 29 22:14:50 2026 -0800
Remove aliases for base::DictValue and base::ListValue
This removes a few last stragglers as well.
Fixed: 478100525
Cq-Include-Trybots: luci.chromium.try:win-official,mac-official,linux-official,android-official,android-desktop-x64-official
Change-Id: If92142b8ab0562a82c609b71c6b2a7665cea6ec6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7513889
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1577038}
```
Issue: https://github.com/brave/brave-browser/issues/52435
* Configure unique GUIDs, installer names, and update paths for Brave Origin
* Fix buildflag_header template to support invoker's public_deps
Chromium Issue number: 7486518 (https://chromium-review.googlesource.com/7486518)
The template was forwarding public_deps from the invoker via
forward_variables_from(), but then unconditionally assigning to it.
This is incompatible - you can't forward a variable and also directly
assign to it.
The fix removes public_deps from forward_variables_from and explicitly
checks for invoker.public_deps after initializing the required
//build:buildflag_header_h dependency.
* Update signing helper to support Origin
With Sparkle (what we currently use):
- Lives in each app bundle separately (Brave and Brave Origin separate)
- There is no priviledged helper in use
- SMAuthorizedClients is not used
With Omaha v4 (not yet in use):
The privileged helper is part of the browser app bundle and not the updater.
The privileged helper is the thing that contains the SMAuthorizedClients value.
The privileged helper gets copied to /Library/PrivilegedHelperTools/<helper name>
The Brave updater is BraveUpdater.app and is the same for both products.
When the browser first runs (or during installation), it registers itself with the updater and the updater installs itself to a shared location like
- /Library/Application Support/BraveSoftware/BraveUpdater/ (system)
- ~/Library/Application Support/BraveSoftware/BraveUpdater/ (user)
Each app register with the updater with its own unique app guid (build/config.gni changes in my pr)
The updater maintains a list of registered apps and checks for updates for each.
Uninstalling one product doesn't remove the updater - it still serves the other.
* Use Origin Sparkle feed URL for Brave Origin builds
* Fix branding files for Origin to not have Browser in the name
This also fixes the wrong info for the Release channel.
* Fix wrong number of strings error because of Origin missing Dev channel
../../chrome/installer/util/l10n_string_util.cc(200,3): error: static assertion failed due to requirement 'std::size(kIDS_APP_SHORTCUTS_SUBDIR_NAME_BASEStrings) ==
13:52:59 install_static::NUM_INSTALL_MODES': resource IDS_APP_SHORTCUTS_SUBDIR_NAME_BASE has the wrong number of mode-specific strings.
13:52:59 200 | DO_MODE_STRINGS
13:52:59 | ^~~~~~~~~~~~~~~
* Adjust product path names for Brave Origin
* Update chromium_src/chrome/browser/component_updater/updater_state_win.cc
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Update chromium_src/chrome/installer/util/google_update_constants.cc
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Update browser/mac/sparkle_glue.mm
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Review fixes
---------
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* 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
Issue: brave/brave-browser#40863
This is the effort to reduce the size of #31939
and only removes already deprecated codes that refers brave dark theme api.
Callsites to this function are now expected to provide the options
value. This change corrects all callsite to the previous default value,
`JSON_PARSE_CHROMIUM_EXTENSIONS`.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/cdb7175c83d9cc319e437da48836ae961cac4adc
commit cdb7175c83d9cc319e437da48836ae961cac4adc
Author: Daniel Cheng <dcheng@chromium.org>
Date: Thu Sep 25 08:39:08 2025 -0700
Remove base::JSONReader::ReadDict's default argument for parsing options
Callers should be explicit if they need to opt into non-compliant JSON
parsing that allows Chromium-specific extensions, e.g. comments.
Bug: 446188265
Change-Id: If70a198e7c1266ec22e8ef6dc6c38b01504bb530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6976572
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1520631}
There is now a validation for unused mojom mapping types, and this
change removes one case where the mapping was not being used in Brave.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/cbfb7d5ab0d7bfddd63cdd159f1fc618ef247791
commit cbfb7d5ab0d7bfddd63cdd159f1fc618ef247791
Author: Fred Shih <ffred@chromium.org>
Date: Wed Jul 9 16:18:30 2025 -0700
Add a verification step for typemap config
If there is a typo in the typemap config, this will raise a warning
telling the developer that a typemap has not been referenced.
Most of the change is mechanical (i.e.: removing dead typemaps that have
no effect).
This change will force typemaps to be declared in the mojom rule that
contains the mojom module where the type is declared, which is probably
better because having another target declare the typemaps can lead to
some very... interesting.. side effects. One of these side effects is
that the type of the generated code will look different, depending on
your deps.
Bug: 428039213
Change-Id: I75b40055cf9cc045b5e7890365550d846fb71145
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6692233
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Fred Shih <ffred@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1484659}
* Remove wallet exstension APIs and replace with WebUI handlers
* Remove typescript definitions which are unused
* Remove the reset of the brave_wallet extension API
* Add test for webui handler changes
Add support for --disable-component-update in all brave components. Use with --allow-brave-component-update to
restore previous behavior for perf and other testing
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
Add admin policy for Web Discovery (#30023)
* Fix Web Discovery API to account for policy, add Web Discovery test
* Move IsWebDiscoveryEnabled/pref_names to components/web_discovery/common
* Check Web Discovery Native feature before loading extension background page
* Use PrefService ref in IsWebDiscoveryEnabled
* Mark WDP policy as pending development for Android
* Move Web Discovery enabled/disabled via policy prefs to //brave/components/constants
This is part of a broader modularisation of the browser, and it should
only affect inclusion paths, namespacing, and gn deps.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/88975c35e41b18a6a94e5c1093001bb7b9cbbf42
commit 88975c35e41b18a6a94e5c1093001bb7b9cbbf42
Author: Alexis Hetu <sugoi@chromium.org>
Date: Mon May 26 05:43:21 2025 -0700
Move ImportedBookmarkEntry to components/
This CL moves the 2 following files:
- imported_bookmark_entry.h
- imported_bookmark_entry.cc
from "chrome/common/importer/"
to "components/user_data_importer/common/".
The CL itself is noop, it is only adjusting the
code for the file location and namespace changes.
Bug: 407587751
Change-Id: I6fa486ff92cdd2d36a3aeb879111d90c518b0974
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6578818
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Auto-Submit: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1465477}
This change affects Brave's overrides for some of the enums, which
requires moving both patching and overriding to the new path.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/8205399f38064cf4f292aac79140f206e06ba31e
commit 8205399f38064cf4f292aac79140f206e06ba31e
Author: Alexis Hetu <sugoi@chromium.org>
Date: Fri May 23 06:29:52 2025 -0700
Move importer data types to components/
This CL moves the 3 following file:
- importer_data_types.h
- importer_data_types.cc
- importer_type.h
from "chrome/common/importer/"
to "components/user_data_importer/common/".
The CL itself is noop, it is only adjusting the
code for the file location and namespace changes.
Bug: 407587751
Change-Id: Ied4c102f67a1ec4bd099cb091dfa7deaf6ef2ff3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6578964
Auto-Submit: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1464699}
This build failure seems to be a result of a recent IWYU fix for
`string_util.h`, and this particular source relying on transient
inclusions.
This fixes adds the necessary header. Some follow up work will be pushed
to remove all uses of `getenv` in our codebase, as we should be using
the `//base` counterpart.
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
This attribute has been deleted from grit, and isn't recognised anymore.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/96c98d3ae26486007669c1cd00e4da58c85659b3
commit 96c98d3ae26486007669c1cd00e4da58c85659b3
Author: dpapad <dpapad@chromium.org>
Date: Tue Feb 4 16:23:24 2025 -0800
Grit: Remove output_all_resource_defines from list of valid attributes.
All references to this attribute have been removed in previous CLs, both
from public and internal repositories.
Fixed: 389466679
This PR simplifies JSON reading in several places by:
- Using `base::JSONReader::ReadDict`
- Using `base::test::ParseJson*`
This changes aim to make the checks around the parsing and its
expectations simpler to read.
* [CodeHealth] Simplifying json parsing - pt.1
This PR changes several places where `JSONReader` is being used, to
either rely on `base::JSONReader::ReadDict` where appropriate, or in the
case of parsing json for tests, to use `base::test::ParseJsonDict` and
other similar functions.
This type is now being used to represent the tag name, as it offers ways
to check at compile time for the tag being valid.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/dd2d901c3ecfb8685f4e4eda55edd6c8247f62da
commit dd2d901c3ecfb8685f4e4eda55edd6c8247f62da
Author: Anthony Vallée-Dubois <anthonyvd@google.com>
Date: Wed Dec 18 15:25:28 2024 -0800
Assert that database tag is valid at compile time
This CL adds facilities to assert at compile-time that a database tag
passed to the `sql::Database` constructors is specified in the
DatabaseTag variant list in the corresponding `histograms.xml` file.
For many users of `Database`, this change is a no-op. That said, some
create databases with `make_unique()`, and the mechanism for forwarding arguments used by that function is incompatible with the
implicit invocation of the consteval constructor this CL introduces.
For this reason, these callers are also updated to explicitly create
the tag object.
Finally, 19 databases were using tags not defined in the histograms
file, so this CL adds these tags as variants.
Change-Id: I7aa6fdc4b923325cc41038fef72b239b5c19e4bd
This is now a required argument in the constructor. This change assumes
the expected value.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e3c94919c5b39b6959e0db9e274ce663ad306aff
commit e3c94919c5b39b6959e0db9e274ce663ad306aff
Author: Anthony Vallée-Dubois <anthonyvd@google.com>
Date: Thu Dec 12 08:47:47 2024 -0800
Make database tag mandatory
This CL removes the default value of the `tag` argument on the 2
`sql::Database` constructors, and updates all callers that didn't
explicitly pass a tag to do so.
As a convenience, this CL also defines a common tag for unit tests.
This will allow the implementation and monitoring of per-database
performance metrics (time to open, statement execution time, VMSteps,
etc) without the possibility of having some of the databases
uninstrumented. This is useful for diagnosing issues such as crbug.com/369635654 in the wild, and required for some performance investigations that we have in the pipeline.
The last step of this work item (asserting that the tag is correctly defined in histograms.xml variants) is implemented in https://chromium-review.googlesource.com/c/chromium/src/+/6055279.
Bug: 40949392
../../chrome/common/importer/firefox_importer_utils.cc:335:38: error: use of undeclared identifier 'IDS_IMPORT_FROM_ICEWEASEL'
335 | return l10n_util::GetStringUTF16(IDS_IMPORT_FROM_ICEWEASEL);
| ^
../../chrome/common/importer/firefox_importer_utils.cc:336:36: error: use of undeclared identifier 'IDS_IMPORT_FROM_FIREFOX'
336 | return l10n_util::GetStringUTF16(IDS_IMPORT_FROM_FIREFOX);
| ^
2 errors generated.
Upstream has these strings only for non-Android platforms, but we are
using the importer code on Android as well, so the string need to be
re-added for Android.
This was only being added to satisfy the android build, but it has now
been dropped by upstream with `NOTREACHED_NORETURN`.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/5a9d4c5aa85977fc711eb9c0ff1207c5ac1a0959
commit 5a9d4c5aa85977fc711eb9c0ff1207c5ac1a0959
Author: Peter Boström <pbos@chromium.org>
Date: Tue Nov 12 01:38:46 2024 +0000
Remove enable_log_error_not_reached
This flag only applied to NOTREACHED_IN_MIGRATION() for ChromeOS which
is on its way out.
Bug: 40580068