* [Android] Register Brave as Android AutofillService for address autofill
Re-enables the Android AutofillService that was removed in
https://github.com/brave/brave-core/pull/25759 due to crashes on
split-APK installs. Uses the SplitCompat pattern
(SplitCompatAutofillService base class) so the service works correctly
when installed from the Play Store.
When the user selects Brave as their autofill provider in Android Settings,
Brave can fill saved address profiles into third-party apps and save new
addresses from manually filled forms.
Resolves: https://github.com/brave/brave-browser/issues/41334
All toolbar variants (upstream and Brave) are persisted to SharedPreferences as integers.
Upstream guards against shifts by using explicit numeric assignments in the header.
Brave values must do the same — if they are defined implicitly and upstream inserts a new entry above them, the whole range shifts and users lose their saved setting.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6ef9d2f680a39f97473af883b8fc394b581b6c0
commit c6ef9d2f680a39f97473af883b8fc394b581b6c0
Author: Bhuvana Betini <bbetini@google.com>
Date: Thu Feb 12 09:55:15 2026 -0800
[Glic] Add CPA toolbar entrypoint
This CL implements a baseline CPA entrypoint for Glic on Android. It
introduces the GlicToolbarButtonController to manage UI and on-click
handling. Also, it introduces the GlicActionProvider for future
conditional cueing logic. The dataflow integrates Glic into the
segmentation platform model to allow for conditional button display and
registers the new button type in histogram metrics for tracking.
Because the flag is not by set by native and the button is added to
the toolbar, a Cached Flag is used to prevent NPEs for unit tests.
In future CLs, the Glic button will have proper styling, be hooked up to
bottom sheet, and use data from contextual_cueing_service to be
conditionally shown.
Bug: 475590295
Change-Id: Ic31cd0c7ab1428abc679e330e6da86cb8531914c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7551433
Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
Commit-Queue: Bhuvana Betini <bbetini@google.com>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584071}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6ef9d2f680a39f97473af883b8fc394b581b6c0
commit c6ef9d2f680a39f97473af883b8fc394b581b6c0
Author: Bhuvana Betini <bbetini@google.com>
Date: Thu Feb 12 09:55:15 2026 -0800
[Glic] Add CPA toolbar entrypoint
This CL implements a baseline CPA entrypoint for Glic on Android. It
introduces the GlicToolbarButtonController to manage UI and on-click
handling. Also, it introduces the GlicActionProvider for future
conditional cueing logic. The dataflow integrates Glic into the
segmentation platform model to allow for conditional button display and
registers the new button type in histogram metrics for tracking.
Because the flag is not by set by native and the button is added to
the toolbar, a Cached Flag is used to prevent NPEs for unit tests.
In future CLs, the Glic button will have proper styling, be hooked up to
bottom sheet, and use data from contextual_cueing_service to be
conditionally shown.
Bug: 475590295
Change-Id: Ic31cd0c7ab1428abc679e330e6da86cb8531914c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7551433
Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
Commit-Queue: Bhuvana Betini <bbetini@google.com>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584071}
Implements new layout for widget search promo panel and introduces better handling of activity recreations and configuration changes to redraw the widget search promo panel with correct theme (day/night) and proper position.
Other notable enhancements:
- Tweak tablet margins to better frame the onboarding cards on foldable devices after initial review with the design team.
- Fix post-FRE intent and delay activity to avoid a glitch on foldable devices by following the same strategy applied upstream.
- Accessibility: include content descriptions for widget search promo panel images.
- Nala: include new drawables from Nala tokens.
- Append new source android-widget for all searches made from the widget.
- Implement tests to verify new source android-widget.
shouldShowNtpAsHomeSurfaceAtStartup method has new persistableBundle
argyment
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c2c3eb60bfae7281db65395756660c8977378714
Explicitly disallow start surface after app update when restoring persistent state
When a window is restored as part of the persistAcrossReboots feature,
the start surface may be shown afterwards. This change prevents the
start surface from being shown if the persistent state indicates that
the window was restored after an app update, in order to minimize any
disruptions.
Bug: 459921316
Change-Id: Ib02ef3277d3d536479cab4ae5c877c07b74d5dae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7534264
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/23c8fddd48102899160ce4d71b1ab1949c88a248
[Theme] Add NtpCustomizationPolicyManager.
In this CL, we add NtpCustomizationPolicyManager which listens to
Pref.NTP_CUSTOM_BACKGROUND_DICT changes.
1) Pref.NTP_CUSTOM_BACKGROUND_DICT being managed means the
policy::key::NTPCustomBackgroundEnabled is disabled.
2) When the policy NTPCustomBackgroundEnabled changes,
NtpCustomizationPolicyManager saves the latest policy value to the
shared preference. It will apply after relaunch chrome. This allows
the UI correct when CTA isn't recreated.
Demo: http://shortn/_nBBqRNFS3N
Bug: 467029432
Change-Id: I04a50d0d814802fbd3ef8be29414a17181adae98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7500251
[Android] Fix for NTP idle snackbar shows when opening external links
from other apps. When the NTP idle experiment (variants B/C) is active
and the inactivity threshold has been reached, opening a link from an
external app should not show an NTP+snackbar.
Resolves: https://github.com/brave/brave-browser/issues/52746
This fixes the following error:
C 07:43:50.007 21.797s Main 1| java.lang.IllegalArgumentException: SemanticColorUtils requires a value for the brave.junit.tests:attr/colorSurface attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).
C 07:43:50.007 21.797s Main 1| at com.google.android.material.resources.MaterialAttributes.resolveTypedValueOrThrow(MaterialAttributes.java:72)
C 07:43:50.007 21.797s Main 1| at com.google.android.material.color.MaterialColors.getColor(MaterialColors.java:94)
C 07:43:50.007 21.797s Main 1| at org.chromium.components.browser_ui.styles.SemanticColorUtils.resolve(SemanticColorUtils.java:33)
C 07:43:50.007 21.797s Main 1| at org.chromium.components.browser_ui.styles.SemanticColorUtils.getDefaultBgColor(SemanticColorUtils.java:43)
C 07:43:50.007 21.797s Main 1| at org.chromium.chrome.browser.ChromeBaseAppCompatActivity.initializeSystemBarColors(ChromeBaseAppCompatActivity.java:315)
C 07:43:50.007 21.797s Main 1| at org.chromium.chrome.browser.ChromeBaseAppCompatActivity.onCreate(ChromeBaseAppCompatActivity.java:251)
C 07:43:50.007 21.797s Main 1| at org.chromium.chrome.browser.init.AsyncInitializationActivity.abortLaunch(AsyncInitializationActivity.java:453)
C 07:43:50.007 21.797s Main 1| at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreateInternal(AsyncInitializationActivity.java:419)
C 07:43:50.007 21.797s Main 1| at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreate(AsyncInitializationActivity.java:344)
C 07:43:50.007 21.797s Main 1| at android.app.Activity.performCreate(Activity.java:9155)
C 07:43:50.007 21.797s Main 1| at android.app.Activity.performCreate(Activity.java:9133)
C 07:43:50.007 21.797s Main 1| at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1521)
C 07:43:50.007 21.797s Main 1| at org.robolectric.android.internal.RoboMonitoringInstrumentation.callActivityOnCreate(RoboMonitoringInstrumentation.java:377)
C 07:43:50.007 21.797s Main 1| at org.robolectric.android.controller.ActivityController.lambda$create$0(ActivityController.java:136)
C 07:43:50.007 21.797s Main 1| at org.robolectric.shadows.ShadowPausedLooper.runPaused(ShadowPausedLooper.java:264)
C 07:43:50.007 21.797s Main 1| at org.robolectric.android.controller.ActivityController.create(ActivityController.java:134)
C 07:43:50.007 21.797s Main 1| at org.robolectric.android.controller.ActivityController.create(ActivityController.java:144)
C 07:43:50.007 21.798s Main 1| at org.chromium.chrome.browser.vpn.activities.BraveVpnParentActivityTest.testShouldBringToTop_TrueForProfileActivity(BraveVpnParentActivityTest.java:26)
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/416a61c418c152a7a7ae568d89302e5ecb6e4a3d
commit 416a61c418c152a7a7ae568d89302e5ecb6e4a3d
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Dec 2 14:13:59 2025 -0800
Android: Split ObservableSupplier into Nullable / Monotonic / NonNull variants
The goal is to use proper @Nullable annotations with
ObservableSuppliers.
To achieve this, we use interfaces that define nullness:
* (Settable)NullableObservableSupplier
* (Settable)ObservableSupplier <-- monotonic
* (Settable)NonNullObservableSupplier
And we have ObservableSupplierImpl implement all of them.
In order to make this migration manageable, I've marked the interfaces
as @NullUnmarked, and will fix annotations in batches until they
can be marked @NullMarked.
This CL includes a batch in order to test out the new interfaces (and
because many were necessary to make the change).
Monotonic suppliers are by far the most common afaict, so that's why
the non-prefixed ObservableSupplier is the monotonic one (that, and
because "Monotonic" is a mouthful).
One implication of this approach is that we'll never have:
ObservableSupplier<@Nullable Foo>
We'd have instead:
NullableObservableSupplier<Foo>
Having the nullness in the interface rather than in the generic
allows for defining toNonNull() only on monotonic suppliers, and
simplifies the implementation.
Bug: 455874046
Change-Id: Id48e235b9ff16a5b21a9c1199863150d17c22736
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206746
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1553094}
Currently there is an async mojo call to check policies for Leo and
Rewards, that is an overhead and not needed, in fact it could be wrong
if the policies controlled by something else that is not Origin.
Resolves: https://github.com/brave/brave-browser/issues/52244
Added an ability to start shred manually from two places:
- tab's context menu (includes support of the menu customization)
- tab switch mode
Added confirmation dialog before the site data shred operation
Resolves: https://github.com/brave/brave-browser/issues/51326
---------
Signed-off-by: Vadym Struts <vstruts@brave.com>
* 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
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/9857d221a38d5965cbe7d54c0a8f7e37a1a8634c
commit 9857d221a38d5965cbe7d54c0a8f7e37a1a8634c
Author: Mahmoud Rashad <mmrashad@google.com>
Date: Tue Oct 14 06:43:47 2025 -0700
Adopt getUserActionableError() in getSyncStatusSummary()
A few users could have different sync status summary after this change,
due to the change in the order of the error checks. This piece of code
won't be reached soon, as syncing users are getting migrated.
This CL also removes the last usage of some of SyncServiceAndroidBridge
functions, which got removed.
Bug: 40890809
Change-Id: I1b55de12330151c8f505c49250471d45a6729931
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7031946
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Mahmoud Rashad <mmrashad@google.com>
Cr-Commit-Position: refs/heads/main@{#1529488}
Introduces a unified Wallet-fragment architecture that centralizes how Brave's Android wallet UI talks to WalletModel, manages pending transactions, and stays in sync with keyring state.
Previously, we removed a call to bringChromeTabbedActivityToTheTop in
order to prevent closing the server country selection dialog.
However, this introduced a regression in that the enrollment screens
which depend on this call no longer close and the user would resultantly
have to back out of them.
Now, we conditionally invoke the call unless the activity is coming from
either the country selection or city selection dialog.
Unit tests have been added to verify the behaviour.
Resolvesbrave/brave-browser#50163
* [cr142] Fixed open Mobile bookmarks folder as home page
Resolves https://github.com/brave/brave-browser/issues/50294
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7e28ed8607fec26cac4ab4dbc6c43f46f14bfe7b
components/bookmark_codec: start writing sha256
Writepath changes: Start writing SHA256 alongside MD5. Readpath changes:
Read MD5 and optionally SHA256.
After a couple of milestones, intended change is to stop writing the md5
but continue reading both. A few milestones after that, stop reading
md5.
Include `EnableBookmarkCodecSHA256` in case this cl needs to be disabled
via go/finch-killswitch.
Enabled-by-default-reason: killswitch EnableBookmarkCodecSHA256
Bug: 426243026
Change-Id: Ie545e1a3563dc3add88408899a6704016276e901
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6710952