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
This new header is supposed to simplify the inclusion of
`PlatformBrowserTest` for android/non-android tests.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/dbf91b261f7a99ae7937eecc7ce2871feeb20c0b
commit dbf91b261f7a99ae7937eecc7ce2871feeb20c0b
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Thu Aug 22 22:35:56 2024 +0000
Move PlatformBrowserTest alias to platform_browser_test.h
Currently, every test leveraging PlatformBrowserTest should include
the following if-def block:
```
#if BUILDFLAG(IS_ANDROID)
#include "chrome/test/base/android/android_browser_test.h"
#else
#include "chrome/test/base/in_process_browser_test.h"
#endif
```
And, in turn, PlatformBrowserTest is an alias for either
AndroidBrowserTest or InProcessBrowserTest, as defined in each of
those files.
This makes for a lot of boilerplate, and instead we can just move
that if-def'd alias to a single file, platform_browser_test.h, that
each class can include.
This CL makes the following changes:
- Updates any sites that previously included that if-def block to just
include platform_browser_test.h
- Fixes many IWYU cases where classes were not properly including any
header file
- `git cl format` (which fixes a few cases of improper header sorting)
Bug: 361002665
Chromium change:
https://chromium.googlesource.com/chromium/src/+/ec463f3e1ee7b
commit ec463f3e1ee7b6f66b4c71d0dbd772c4c8d07ad2
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Fri Aug 16 02:24:51 2024 +0000
[Extensions] Add a //chrome/common/extensions build target
Extract out files from //chrome/common/extensions into a separate
build target, //chrome/common/extensions:extensions, instead of having
them shared in //chrome/common:common_lib.
In addition to reducing the monolithic build file in //chrome/common,
this some circular dependencies between //chrome/common resources and
extensions files.
Bug: 356905053
`metrics::CallStackProfileParams::Thread` has been changed into
`base::ProfilerThreadType`. This has no functional effect, and it is
merely a namespace movement.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/1e3019857591c2a4a8bc814cab8af3d32ed2be3e
commit 1e3019857591c2a4a8bc814cab8af3d32ed2be3e
Author: Jason Chase <chasej@chromium.org>
Date: Fri Jul 26 19:03:58 2024 +0000
Move CallStackProfileParams into //base/profiler
- First step in the refactoring for crbug.com/354124876. See:
https://docs.google.com/document/d/12pqVqIpLb5qxmm9T9qatbVcp5UnietMcpByUc0XPfYE/edit?usp=sharing
- Rename the Process|Thread enums to Profiler[Process|Thread]Type and
extract into a separate file, as part of the move. These enums are
nested in a struct, but many references don't use the containing
struct.
Low-Coverage-Reason: TRIVIAL_CHANGE to ios/chrome/browser/web/model/ios_thread_profiler.cc, with moving struct and enum to different header files.
Bug: 354124876
* Content picker: a single JS to inject
* Remove a non-relevant test
* Use asset/source to inline html content
* Remove host from braveShields.addSiteCosmeticFilter
* Remove obsolete async
* Use mode: closed
* Update CSS styles