Commit Graph
1190 Commits
Author SHA1 Message Date
Kevin Smith 6ad9768032 [Rewards] Move browser targets behind build flag (#33798) 2026-02-12 07:50:04 -05:00
Kevin Smith 2fd3ffa13a [Shields UI] Add Brave logo to app menu button (#33585) 2026-02-05 20:18:21 -05:00
cdesouza-chromium f5c6a0136f [CodeHealth] Use base::DictValue/base::ListValue - Part I (#33614)
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
2026-02-04 12:54:52 -03:00
Brian R. BondyandMichael Herrmann f92f3ae680 Configure unique GUIDs, installer names, and update paths for Brave Origin (#33184)
* 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>
2026-01-29 13:13:05 -05:00
Brian R. Bondy facb8df1e1 Add Brave talk build flag (#32917)
* Add Brave talk buildflag

* Review comments
2025-12-23 09:16:42 -05:00
Pavel Beloborodov effa3c03e8 Restore 'View in Chrome Web Store' link for installed extensions (#32749)
* Restored web store link for extensions.
2025-12-10 21:16:58 +07:00
Darnell Andries 9c19af3949 [AI Chat] Add local code execution tool (#31252)
* [AI Chat] Local code execution tool

* Move `CodeSandboxScriptStorage` ownership to `AIChatService`, store & return `std::string` from storage

* Update code execution tool event UI

* Add `CodeSandboxNavigationThrottle`

* Omit window and location in code execution scope

* Remove `CodeSandboxScriptStorage`

* Use sandboxed iframe for code execution, use primary OTR profile

* Use script injection for code execution

* `expandedContent` should be null if `jsCode` is null

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Move code sandbox webui constants
2025-12-04 20:28:33 +01:00
Brian R. Bondy a4d9248fcb Add enable_brave_wallet gn var and build flag (#32484)
* 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
2025-11-28 15:54:27 -05:00
cdesouza-chromium 6272401ed9 [IWYU] base/files/file_util.h (#32385)
This PR corrects several inclusions of `base/files/file_util.h`,
specially in headers where it is absolutely not supposed to occur.

Bug: https://github.com/brave/brave-browser/issues/42212
2025-11-20 18:41:41 +00:00
Simon Hong f064098d43 Cleanup deprecated brave theme apis (#32089)
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.
2025-10-30 09:24:51 +09:00
Kevin Smith 5f9aaabf29 [Rounded Corners] Replace flag with a pref and settings toggle (#31602) 2025-10-21 13:47:01 -04:00
Claudio DeSouza dacb37795f [cr142] JSONReader::ReadDict removed default options
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}
2025-10-15 20:31:22 -04:00
Kevin Smith fabe4faf5e [Rewards] Migrate wallet UI from Rewards extention API to mojo (#30614) 2025-08-28 15:39:36 -04:00
Claudio DeSouza 5abf642e62 [cr140] Deleting mapping for chrome.mojom.SourceProfile
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}
2025-08-19 19:54:21 +01:00
Emerick Rogul 0d85e94786 [cr140] Remove obsolete ppapi switch
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/291304d3f15315aed50c1ecfeffb48e362e19188

commit 291304d3f15315aed50c1ecfeffb48e362e19188
Author: Dave Tapuska <dtapuska@chromium.org>
Date:   Fri Jun 27 08:21:09 2025 -0700

    [pepper] More pepper removal

    - Remove ppapi switches
    - Remove callbacks no longer used

    Bug: 40511450
    Change-Id: I61b8ff670f112f9704c551a974aed35a8fe22981
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6677511
    Owners-Override: Dave Tapuska <dtapuska@chromium.org>
    Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1479840}
2025-08-19 19:54:19 +01:00
Kevin Smith 8c5fe79afb [Rewards] Remove notification extension API (#30615) 2025-08-13 20:17:33 -04:00
Brian R. Bondy 1f9f37631b Remove Brave Wallet extension APIs that don't need to be APIs (#30553)
* 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
2025-08-08 17:20:02 -04:00
Brian Johnson 464dabb88c Fix handling of --disable-component-update for legacy component registration (#30440)
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
2025-08-06 14:25:38 +09:00
cdesouza-chromium 5eb666f034 [CodeHealth] Run gn format on all files (#30448)
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
2025-08-05 18:08:10 +01:00
Darnell Andries 82165c4b01 Add admin policy for Web Discovery (#30023)
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
2025-07-28 22:05:29 -07:00
Brian Johnson 181d7e17e1 Cleanup some incorrect usage of //extensions/common from android and ios (#30251) 2025-07-24 16:26:36 -07:00
cypt4 6381e7d43e [Cardano] Add Cardano dApp setting (#30004)
* [Cardano] Add Cardano dApp setting
Resolves https://github.com/brave/brave-browser/issues/46374
2025-07-18 20:32:13 +07:00
cypt4 3169c61e13 [Cardano] Add window.cardano.brave js object (#29255)
* [Cardano] Add window.cardano.brave js object
Resolves https://github.com/brave/brave-core/pull/29101
2025-06-16 19:11:17 +07:00
cdesouza-chromium 821274796b [IWYU] Fixing logging inclusions pt.11 (#29531)
This change is one of many fixing inclusion for the following files:

    - `base/notimplemented.h`
    - `base/notreached.h`
    - `base/check.h`
    - `base/dcheck_is_on.h`
    - `base/check_deref.h`
    - `base/check_op.h`
    - `base/logging/log_severity.h`
    - `base/logging.h`

This change is a mechanical change done with the following script:
https://github.com/brave/brave-browser/issues/46707#issuecomment-2960116515

Resolves https://github.com/brave/brave-browser/issues/46707
2025-06-12 13:48:07 +01:00
Claudio DeSouza 7ebb5415ee [cr138] ImportedBookmarkEntry now under //component
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}
2025-06-11 17:07:44 -04:00
Claudio DeSouza f6fd83f28b [cr138] Importer data types under //components
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}
2025-06-11 17:07:42 -04:00
Claudio DeSouza d396876586 Fixing getenv linux build failure
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.
2025-06-05 15:14:11 +01:00
cdesouza-chromium 8df5afaa2f [iwyu] Fixing inclusions for string_util.h pt.1 (#29376)
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
2025-06-04 16:15:27 +01:00
Kevin Smith 2f57ca6b1d [Rewards] Remove Rewards 3.0 feature flag (#28199) 2025-05-30 05:54:37 -04:00
Brian R. Bondy 1174a90b46 Remove Ethereum Remote Client (Crypto Wallets) (#29135)
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
2025-05-23 16:56:41 -04:00
Max Karolinskiy c7041efd19 Hides Passwords checkbox in import dialog for Chrome. (#29149)
Chrome encrypts passwords and their code for doing so is not open
source.
2025-05-21 12:21:28 -07:00
Pavel Beloborodov 2fa4515000 Fixed extensions import (#29084)
* Fixed crash during import from multiple profiles.
* Fixed state check of the source extension.
2025-05-16 19:45:37 +07:00
AlexeyBarabash b62ab3a4b6 Revert "Force load of dev_ui_resources.pak on universal apk (#28870)" (#29013)
* Revert "Force load of dev_ui_resources.pak on universal apk (#28870)"

This reverts commit b16cd933fd.

reason: worsen app start performance
2025-05-10 00:34:45 +02:00
AlexeyBarabash b16cd933fd Force load of dev_ui_resources.pak on universal apk (#28870)
Force load of dev_ui_resources.pak on universal apk

fixes brave/brave-browser#45158
2025-04-29 14:46:06 +03:00
Darnell Andries bb74aa3baf Add devlopment extension to Web Discovery API allowlist 2025-03-24 19:23:42 -07:00
Claudio DeSouza 0a4e3299e4 [cr135] output_all_resource_defines removed from grds
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
2025-03-18 20:02:00 -04:00
cdesouza-chromium a646e698ee [CodeHealth] Simplifying json parsing - pt.2 (#27697)
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.
2025-02-18 14:09:24 +00:00
Brian Clifton 93cf3f5d0c Prevents extensions from accessing protected resources (#27481)
* Prevents extensions from accessing protected resources.

Fixes https://github.com/brave/brave-browser/issues/42998

* Changed root object from std::string to GURL

* FIXUP: review feedback

* FIXUP: addresses most feedback; need to fix GN

* FIXUP: latest

* FIXUP: fixed reference issues causing crash :)

* FIXUP: one last fix

* FIXUP: presubmit fixes

* FIXUP: more review feedback fixes

* FIXUP: fixing vector copies
2025-02-12 11:03:44 -07:00
cdesouza-chromium 6eecb77ef2 [CodeHealth] Simplifying json parsing - pt.1 (#27506)
* [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.
2025-02-07 08:58:13 +00:00
Darnell Andries cf94b54d8b Bootstrap Web Discovery Native, add credential manager and server config loading 2025-01-27 18:22:39 -08:00
Max Karolinskiy 8e4a95acd2 Merge pull request #26537 from brave/cr133
Upgrade from Chromium 132 to Chromium 133.
2025-01-27 13:11:03 -05:00
Claudio DeSouza cf11547646 [cr133] Use sql::Database::Tag
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
2025-01-27 09:41:28 -05:00
Claudio DeSouza 9dfbd05d1f [cr133] Sqlite database tag obligatory
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
2025-01-27 09:41:20 -05:00
Max Karolinskiy 44683b9082 [cr133][Android] Fixes importer build error due to missing strings.
../../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.
2025-01-27 09:36:30 -05:00
Darnell Andries 4c7a62f54f Address GMix/WDP fix feedback 2025-01-23 17:07:33 -08:00
Darnell Andries 2978fffa20 Add hidden renderer for fetching backup search results 2025-01-23 17:07:33 -08:00
Brian Johnson afd4e0239d fix overly permissive DEPS (#27193)
Fix overly permissive deps
2025-01-12 21:43:04 -07:00
Claudio DeSouza 57dfb551fc [cr132] //base:logging_buildflags deleted
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
2024-12-01 08:43:56 -05:00
zenparsing d5036805ed Remove auto-contribute 2024-11-20 16:02:25 -05:00
Mikhail b8a60ee66f Remove Greaselion (#26283)
* remove greaselion files
* cleanup *.h files
* cleanup *.cc files
* cleanup GN
* cleanup other files
* Fix presubmit
* Remove extension* from {push/pull}_l10n
2024-11-04 21:10:33 +01:00