Commit Graph
76447 Commits
Author SHA1 Message Date
Serg 079729bb4f [Android] Fix crash in BraveRewardsNativeWorker when profile is not ready (#34907)
BraveRewardsNativeWorker crashes when constructed before the browser is
fully initialized. This happens when an AlarmManager retention
notification (DAY_10/DAY_30/DAY_35) fires and the app process is started
by Android just to handle the broadcast — ProfileManager::
GetActiveUserProfile() dereferences a null g_browser_process in this
case.

The fix:
- Checks that GetActiveUserProfile() returns a valid profile before
  creating the native worker in JNI_BraveRewardsNativeWorker_Init. If it
  doesn't, the native object is not created.
- Resets the Java singleton when native init is skipped, so subsequent
  calls can retry once the browser is fully initialized.
- Adds null-profile guards to IsSupported, IsSupportedSkipRegionCheck,
  and IsRewardsEnabled which also call GetActiveUserProfile()
  independently.
- Adds null checks for getInstance() at all call sites since it can now
  return null.

Resolves: https://github.com/brave/brave-browser/issues/53877
2026-03-24 00:19:52 +01:00
Kevin Smith 5da94a45c1 [Shields Panel] Add aria-labels to appropriate links and buttons (#34898) 2026-03-23 18:06:17 -04:00
Kyle Hickinson f0b6d88595 [iOS] Disable inline predictions for sync code words text view (#34902) 2026-03-23 22:48:10 +01:00
Darnell Andries 30fae1189f Add metric for shields dev mode (#34876) 2026-03-23 14:21:25 -07:00
Kyle Hickinson aecf5b0e21 [iOS] Add Brave Talk JavaScriptFeature (#34799)
This introduces a Chromium JavaScriptFeature based on `BraveTalkScript.js`

The script itself deviates from its original in that it is now sandboxed to the isolated content world
2026-03-23 16:44:39 -04:00
Kyle Hickinson a39486edab [iOS] Use correct favicon for NTP in back/forward modal (#34901)
Fixes a regression in #34071 that showed a monogram for the NTP in the back/forward modal instead of the Brave logo
2026-03-23 21:34:48 +01:00
brave-builds d3d57d39b3 1.90.59 2026-03-23 20:31:21 +00:00
samartnik afb83224c9 [Android] UI preparation for custom search engines (#34890)
This PR is only prepares UI and strings, the main implementation will be done separately in the context of brave/brave-browser#21837
2026-03-23 15:33:09 -04:00
Aleksei Seren cf4edb452a Refactor SerpMetrics to use TimePeriodStoreFactory (#34882)
This is a code health change which allows us to simplify
codebase and remove unnecessary `serp_metrics_factory.h`
utility file.
2026-03-23 12:59:32 -05:00
Agustín Ruiz fd3668c036 Adjust Leo icon in omnibar to match design (#34895) 2026-03-23 18:51:04 +01:00
Serg 4fcc36c117 Fixes presubmit warning in claude SKILL.md (#34896) 2026-03-23 18:47:44 +01:00
Terry Mancey 3d77f62203 [ads] Add SERP metrics to virtual pref provider (#34893)
Exposes SERP metrics from ProfileAttributesStorage via the
VirtualPrefProvider delegate so that the ads condition matcher can
target based on a user's search engine usage patterns, for example
serving different ads to users who predominantly use Brave Search vs.
Google. The metrics are surfaced as a virtual pref under
[virtual]:serp_metrics, keeping them accessible to on-device targeting
logic without requiring a registered pref path.
2026-03-23 18:07:51 +01:00
Max Karolinskiy ecfbc5ebd5 Improve local network permission string on MacOS. (#34868)
* Updates rebase l10n script to allow for string replacements in brave_strings.grd
* Ran chromium_rebase_l10n.
2026-03-23 12:39:56 -04:00
Douglas Daniel c990cffd8f [Wallet]: Disable Dominant Color Background for iOS WebUI (#34847)
Fixes a crash that was occurring on iOS WebUI when selecting a token on the Send/Swap/Bridge screens
2026-03-23 11:35:07 -05:00
Kyle Den Hartogandgithub-actions[bot] 089136ec9a Override flatted to 3.4.2 to fix GHSA-rf6f-7fwh-wjgh (#34854)
* Override flatted to 3.4.2 to fix GHSA-rf6f-7fwh-wjgh

Prototype pollution via parse() in flatted <=3.4.1.
Tracking: https://github.com/brave/brave-browser/issues/53816

* Update dependency vendor/web-discovery-project@965f7955d8

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-23 16:28:48 +00:00
Mihai PLESA ae8356fda8 readme migrate from b-b (#34734) 2026-03-23 09:27:39 -07:00
brave-builds e2a90baba7 1.90.58 2026-03-23 16:03:30 +00:00
Brian R. Bondy caa92cf07f Skip violations in surrounding unchanged code during reviews (#34894) 2026-03-23 11:12:13 -04:00
Brian R. Bondy 54d0a15d3a Add best practice: keep PRs focused on a single purpose (#34891) 2026-03-23 11:11:47 -04:00
brave-builds eef847d59b 1.90.57 2026-03-23 12:33:22 +00:00
brave-builds 128c8926fd 1.90.56 2026-03-23 12:03:46 +00:00
Sangwoo KoandAgustín Ruiz 2da7ba6c15 [Containers] Adjust accent color palette for containers (#34855)
* Adjust accent color palette for containers

Based on feedback from Design team, adjust the accent color palette for
containers.

* update color values for container bgs from 50 to 60

* Update key color resolving

---------

Co-authored-by: Agustín Ruiz <aguscr182@gmail.com>
2026-03-23 13:10:19 +09:00
brave-builds 55f60bec3a 1.90.55 2026-03-23 00:04:23 +00:00
Anthony Tseng 80c9469f1d Add model loading to LocalAIService (part 3) (#33726)
* Update LocalModelsUpdater to support dense model files

Add Observer pattern to LocalModelsUpdaterState for notifying
consumers when models are ready. Add dense model file paths for
the 2_Dense and 3_Dense layers.

* Add model loading to LocalAIService and WASM bridge

* Add model loading tests for LocalAIService

Add branch-3-specific tests for the 3-way readiness model
(WASM page loaded, component ready, mojo remote bound).
Fix SetInstallDir to handle empty path as reset for test isolation.

* Read model files directly into BigBuffer shared memory

Allocate BigBuffer(size) upfront — for files >64KB this uses shared
memory internally — then read the file directly into its storage
via File::ReadAndCheck, avoiding a separate heap allocation.

Replace TryLoadModel boolean flags with BarrierClosure(2) that
fires LoadLocalModelFiles once both conditions are met: component
models delivered and WASM factory registered. A fresh barrier is
created on each reset.

Use dependency injection for LocalModelsUpdaterState instead of
GetInstance() singleton access.
2026-03-21 01:59:24 +01:00
Darnell Andries 7c0cadb6da Only report omnibox navigation source metric if URL is http/https (#34881) 2026-03-20 22:33:46 +01:00
Kyle Hickinson 55ff217f78 [iOS] Expose WebState favicon status to CWVWebView (#34842)
This adds access to `WebState::GetFaviconStatus` in `CWVWebView`. At the moment this will always report as `nil` because we don't use Chromiums `WebFaviconDriver`
2026-03-20 16:54:12 -04:00
Kyle Den Hartog 22ade08c0e feat(wallet): pin all *.wallet.brave.com subdomains via HSTS + HPKP (#34859)
* Add api.gate3.brave.com to transport security state

* chore: add wallet.brave.com subdomain
2026-03-21 09:48:17 +13:00
Anthony Tseng c11e31c388 Add best practice: don't rely on implicit const char* to string_view for non-null-terminated data (#34866) 2026-03-20 13:37:45 -07:00
Kyle Hickinson a7e361d59a [iOS] Remove icon kind argument from favicon fetcher (#34843)
This argument was ignored and never used in the function body so remove it from the method and call sites
2026-03-20 16:19:46 -04:00
Douglas Daniel ebf1ed8f63 [AI Chat]: Fix Suggested Questions Overlap (#34869)
Fixes a bug where Suggested Questions was overlapping the header when creating a new conversation.
2026-03-20 15:14:19 -05:00
Anthony Tseng 07665880c1 Improve add-best-practice skill with context gathering and review subagent (#34865) 2026-03-20 20:12:45 +00:00
Brian R. BondyandClaude Opus 4.6 1f1b6b01cb Update TUF-004: don't use sanitizer-specific filters when upstream flakes broadly (#34874)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:20:59 -04:00
Darnell Andries 4f173e789f Add metrics for Shields HTTPS upgrade setting (#34770) 2026-03-20 11:05:31 -07:00
Darnell Andries 9d43525020 Add NTP widget answer to Leo entry point metrics (#34592) 2026-03-20 11:05:11 -07:00
Darnell Andries ea2ccf00d1 Add PWA navigation source metric (#34077)
* Add PWA navigation source metric

* Add comment for YT exception in `PageMetricsTabHelper`

* Swap out browser finder for BrowserWindowInterface
2026-03-20 11:04:48 -07:00
Netzenbot f45a03fd0b Disable flaky BrowsingTopicsInternalsBrowserTest.ClassifierTab (#34867)
Disable Chromium tests ClassifierTab and ClassifierTab_ModelUnavailable
via filter file. These tests have an inherent race condition in
TestAnnotator's async model info callback. Chromium has also disabled
these tests upstream with DISABLED_ prefix. No Brave modifications
exist in the browsing_topics code path. Upstream flake rate: 0.3%
per LUCI Analysis (30 day lookback).

Resolves https://github.com/brave/brave-browser/issues/53618
2026-03-20 13:08:44 -04:00
Nuo Xu 09e1a46f74 [iOS][Wallet] Correctly fetch and check ZEC Tx Gas Token Balance (#34811) 2026-03-20 13:04:21 -04:00
Netzenbot 5bb907f22d Add best practices doc for handling upstream docs (#34864)
Add upstream test failures best practices doc

Consolidates upstream-flake filter guidance from testing-isolation.md
(TI-031, TI-032, TI-041, TI-042, TI-043) and patches.md (PATCH-011)
into a dedicated testing-upstream-failures.md. Expands the flake-check
section with full script usage and the LUCI verdict table.
2026-03-20 12:22:23 -04:00
brave-builds fbafc65eac 1.90.54 2026-03-20 16:03:18 +00:00
Anton Paymyshev ac7cec758d Fix wallet swap data parser crash (#34852) 2026-03-20 22:35:14 +07:00
Netzenbot 249704cfca Rename BEST-PRACTICES.md to best_practices.md (#34861)
Update all internal references in skill docs.
2026-03-20 11:23:36 -04:00
Kyle Hickinson 8aa3e2808b [iOS] Remove legacy tab tray UI & feature flag (#34840)
This removes the old tab tray UI since the feature flag enabling the new UI has been on by default for 6 months
2026-03-20 11:11:19 -04:00
Aleksei Khoroshilov fb0fc3772e Add containers service. (#34807)
* Add containers service.

* Fix few review issues.
2026-03-20 16:01:53 +01:00
Netzenbot 1ae9b6fa89 Fix intermittent trezor_bridge_keyring test failures (#34658)
The 'Bridge not ready' test was creating a real iframe in jsdom via the
unmocked createBridge method. The iframe's onload event could fire
asynchronously at non-deterministic times, causing the pending
createBridge promise to resolve during a subsequent test. When the old
async executor resumed, it interfered with the currently running test,
causing all tests that use sendCommandToTrezorFrame to fail with
BridgeNotReady.

Fix by mocking createBridge in the 'Bridge not ready' test to use a
lightweight div element (to satisfy hasBridgeCreated) and return a
never-resolving promise, avoiding jsdom iframe side effects while
preserving the test's intent.

Resolves https://github.com/brave/brave-browser/issues/53483
2026-03-20 10:46:04 -04:00
AlexeyBarabash d2c91e9eb1 Fixed CheckSettingsChanges presubmit function (#34666)
* Fixed `CheckSettingsChanges` presubmit function

There were two problems:
1. Somehow the `registry_full_path` misses segments `chrome` and
   `android` when accessing `SearchIndexProviderRegistry.java`, so
   it is
   `.../brave-browser/src/java/src/org/chromium/chrome/browser/settings/search/SearchIndexProviderRegistry.java`
   instead of an actual
   `.../brave-browser/src/chrome/android/java/src/org/chromium/chrome/browser/settings/search/SearchIndexProviderRegistry.java`
   which causes the registry not being read
2. `input_api.ReadFile` could not read outside of repo root which
   is `brave-browser/src/brave` so it could not read `SearchIndexProviderRegistry.java`

Fixed both with patching or chromium_presubmit_overrides.py

Resolves https://github.com/brave/brave-browser/issues/53560
2026-03-20 16:35:51 +02:00
AlexeyBarabash a5a4c92555 [Android] Change back the number of tiles on NTP to 11 (#34845)
Resolves https://github.com/brave/brave-browser/issues/53813

This is cr146 regression

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/aa3361c165e11f04d6cfbbadb6986d502a7f0e28

commit aa3361c165e11f04d6cfbbadb6986d502a7f0e28
Author: Samuel Huang <huangs@chromium.org>
Date:   Wed Jan 21 11:41:57 2026 -0800

    [Android NTP] Limit the number of MVT tiles to 8.

    Previously, the Android MVT could show up to 12 tiles in total. Custom
    Tiles (CT) had priority (up to 8), and Top Sites Tiles (TST) would fill
    the remaining slots up to the total limit of 12.

    Per UI guideline, this CL reduces the total limit from 12 to 8. Note
    that CTs continue to have priority, so if a user has 8 CTs then they
    don't see TSTs any more.

    This is an opportunity for backend optimization:
    * If 8 CTs exist then we can simply skip TST computation -- but this
      would be an abrupt transition
    * If 1-7 CTs exist then we can partially skip TST computation -- but
      this requires more refactoring.

    However, for simplicity, we skip these for now.

    Bug: 477017208
    Change-Id: Ie2251764b36d76c453985fbf22d101cb1354d637
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7495331
    Commit-Queue: Samuel Huang <huangs@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1572479}
2026-03-20 16:31:30 +02:00
brave-builds e1a148fead 1.90.53 2026-03-20 12:33:38 +00:00
Aleksei Khoroshilov f31f05eb60 Treat all tsconfig files as jsonc (#34781)
Treat all tsconfig files as jsonc.
2026-03-20 08:27:20 -04:00
brave-builds a66f71d33a 1.90.52 2026-03-20 12:02:54 +00:00
Simone Arpe 8b52bd7400 (Wallet) Improve account name generation (#34831) 2026-03-20 12:59:26 +01:00