Commit Graph
77384 Commits
Author SHA1 Message Date
Kyle Den Hartog bf96c459c6 address RUSTSEC-2026-0104 (#35767) 2026-04-22 06:50:20 -07:00
cdesouza-chromium 6a3e634a7d [brockit] Detection for meaningful changes after apply_patches (#35598)
This PR introduces a check in brockit, to go over all modified patch
files that are about to be committed, be it as updated patches, or
conflict-resolved, and checks if any of them have a different number of
hunks, and if so, stops the process for intervention, the same way it is
done when deleted patches are detected.

This check will prevent cases where hunks of a patch file are being
dropped, either through `apply_patches`, or through 3way resolution,
which should be of interest, and definitely should be submitted
separately as an individual fix.

Resolves https://github.com/brave/brave-browser/issues/47717
2026-04-22 13:52:13 +01:00
Douglas Daniel 9fe34d7df5 [Wallet]: Display Origin in Permission Panel (#35493)
Will now display the Site Origin in the Permission Duration step of the Connect With Site panel
2026-04-22 07:45:34 -05:00
Douglas Daniel d8d3c9f09e [Wallet]: AutoFocus Search in Select Token Modal (#35735)
Will now AutoFocus the search input when opening the Select Token Modal
2026-04-22 07:44:53 -05:00
brave-builds ea5f0656cf 1.91.96 2026-04-22 12:33:24 +00:00
brave-builds 91e2af4a9f 1.91.95 2026-04-22 12:03:48 +00:00
r0hit0303 0f60386ad7 Refactor brave user agent component installer (#35504)
Minor refactor to improve code health.
2026-04-22 12:16:12 +02:00
vadims a334a1f3f9 [PSST] Add consent dialog UI front-end part (#35441)
Implemented the front-end for the PSST consent dialog, which displays
a list of current operations with the ability to select an operation
and view both individual and global statuses.

Resolves https://github.com/brave/brave-browser/issues/54400

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2026-04-22 11:01:21 +02:00
brave-builds 7614e9ecb7 1.91.94 2026-04-22 07:21:09 +00:00
r0hit0303 5547ce3413 Add logic to load and parse query filter rule file (#35586)
Adds a singleton QueryFilterData class to load, and then parse the downloaded rules of [query-filter component](https://github.com/brave/brave-browser/issues/54393). The `QueryFilterData` class then store these rules in memory via a `vector` of new data structure `QueryFilterRule` which is exposed to public via the member `rules()` method. 

Client integration to consume the query-filter would be followed-up in the next change. This change also includes unit tests, and was also tested manually to ensure the component was downloaded from server and was parsed correctly. The change is behind the feature flag [kQueryFilterComponent](https://sourcegraph.com/r/github.com/brave/brave-core/-/blob/components/query_filter/common/features.cc?L13) which is disabled by default.
2026-04-22 09:04:47 +02:00
Aleksei Khoroshilov 5e9a741a1d Fix few config.ts TS issues. (#35619)
Cleanup some build/commands/config.ts issues.
2026-04-22 06:57:01 +00:00
Linh c9268ef4ae Bump version to 1.91.93 (#35756)
Manually bump to 1.91.93
2026-04-22 07:47:54 +01:00
Sangwoo Ko 093e8ca98e Try fixing crash when closing a tab with accent icon. (#35753)
It could be a timing issue where small accent icon view isn't hidden yet after
a tab is being closed. When the web contents is not available anymore,
the container can be invalid, while the tab accent icon isn't hidden yet.
2026-04-22 15:22:44 +09:00
Sangwoo Ko f505da86f5 Clear containers menu runner/model before the delegate (#35751)
container menu runner and model are referencing the delegate, so we need to
clear them before the delegate so reopening the menu does not destroy the
delegate first.
2026-04-22 15:22:29 +09:00
Anthony Tseng 1666370521 Reland #35004 "Replace kLocalAIModels with upstream kHistoryEmbeddings" (#35250)
Use chromium's existing kHistoryEmbeddings feature flag instead of
maintaining a separate kLocalAIModels flag. Replace all kLocalAIModels
references with history_embeddings::kHistoryEmbeddings and remove
kLocalAIModels.

- Re-expose the upstream history-embeddings flag entry in about:flags
  (the upstream entry expired at M145)
- Override IsHistoryEmbeddingsEnabledForProfile() to bypass upstream's
  per-profile OptimizationGuide pref check
  (ShouldFeatureBeCurrentlyEnabledForUser(kHistorySearch)), which
  Brave doesn't set up.

No need to override IsHistoryEmbeddingsFeatureEnabled(): upstream's
implementation only auto-enables the feature for us-en-US profiles
when kLaunchedHistoryEmbeddings is enabled, and we already force
kLaunchedHistoryEmbeddings to FEATURE_DISABLED_BY_DEFAULT (pre-existing
override). That kills upstream's auto-launch fallback, leaving
kHistoryEmbeddings as the sole gate for Brave.
2026-04-22 05:59:36 +01:00
Brian Clifton df281eff57 Enable the Force Context Menu on Shift Right Click feature by default (#35724)
* Enable the Force Context Menu on Shift Right Click feature by default

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

* Remove the entry from brave://flags
2026-04-21 21:32:39 -07:00
Sangwoo Ko 480c14d90b Make tab min width option available only when scrollable tab strip is enabled (#35712)
* Make tab min width option available only when scrollable tab strip is enabled.

When scrollable tab strip is disabled, having wider min width could interfere
with user experience. They'll lose ability to see more tabs at once.

* use const

* Address review: add unittest for scrollable tab strip pref
2026-04-22 12:13:52 +09:00
Max Karolinskiy 9cd1aace41 [CodeHealth] Migrate SharedPinnedTabService from Browser to BWI. (#35743) 2026-04-21 23:08:32 -04:00
Douglas Daniel 0ed4995ff0 [AI Chat]: Make Code Block Header Sticky (#35746)
Makes Code Block Headers sticky when scrolling through the chat.
2026-04-21 22:01:14 -05:00
Terry Mancey 0dbf7fd2da [ads] Fix AdsServiceFactory returning nullptr when Rewards unavailable (#35698)
AdsServiceFactory::GetForProfile returned nullptr when IsSupported
was false, which includes a managed pref that can change during a
session. The guard is removed from the factory so AdsService is
always created for regular profiles. BAT ads startup is now gated
in CanStartBatAdsService instead. AdsServiceImpl and
AdsServiceDelegate also handle null service dependencies gracefully.

A follow-up will add an ads-specific group policy to allow
independent control of ads without relying on the Rewards policy.
2026-04-22 01:19:11 +01:00
Jay Harris daeb40547c [AI Chat]: Use better page content extraction (behind a flag) (#35352) 2026-04-22 01:05:50 +01:00
brave-builds 0a6eca8340 1.91.92 2026-04-22 00:03:47 +00:00
Kyle Hickinson 81a466d5d6 [iOS] Enable smooth scrolling in BraveWebClient (#35740)
Brave handles the web views frame while scrolling on the Swift side so we need to return true for the `IsSmoothScrollingSupported` web client method so that it doesn't automatically inset the web view by the safe area

Chromium change:
commit 0b9166658b79a5f788860e3e215165d8d26d73b1
Author: Gauthier Ambard <gambard@chromium.org>
Date:   Mon Mar 9 08:40:04 2026 -0700

    [iOS] Replace use of SmoothScrolling flag with the provider

    This is how it is supposed to be used. Make sure to move all the uses of
    the smooth scrolling flag at the same time to have a state where half
    the app is using the flag and the other app the provider.

    Also, updates the test to ensure they only run when the provider is
    returning true.

    The download manager test is updated as the tap was failing.

    Bug: 483998779
    Change-Id: Ic81a977ecbc0ebc131c49bd992511a97eb916abb
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7648409
    Reviewed-by: Aliona Dangla <alionadangla@chromium.org>
    Commit-Queue: Gauthier Ambard <gambard@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1596357}
2026-04-21 19:49:57 -04:00
Aleksei Seren a716f8d0ea [CodeHealth] Remove unused API from SerpMetricsTimePeriodStorage (#35727)
The deprecated PrefService-based constructors and five methods with no
production callsites were carried over from TimePeriodStorage. The UTC
and DST-offset modes were always disabled in every caller, and the
internal clock was always the system clock, leaving them dead code. All
are removed; tests are migrated to the store-based constructor and a
plain fixture.
2026-04-21 23:23:09 +00:00
Serg 82eaeebda3 [Android] Suppress engagement notifications and promos for Origin users (#35737)
Brave Origin subscribers on Android currently receive general-engagement
notifications and unbidden promo dialogs that are not tied to any
Origin-disabled feature. Suppress them under the product stance that
Origin users get a cleaner, promo-free experience.

Surfaces gated:
- RetentionNotificationPublisher: HOUR_3, HOUR_24, DAY_6, EVERY_SUNDAY,
  and DORMANT_USERS_DAY_14/25/40 notification fire-time.
- BraveActivity: showDormantUsersEngagementDialog (cold-start and
  in-foreground tap paths), India ad-free callout, YouTube-in-Brave
  dialog.

The existing getIsSubscriptionActive() pref only reflects Play Store
purchases, so it misses desktop-linked subscribers. Introduce a new
Java-side cached boolean BRAVE_ORIGIN_CREDENTIAL_SUMMARY_CACHED, written
from two authoritative any-source signals:

- fetchOrderCredentials success (primes the cache immediately on a
  successful Play Store purchase).
- requestCredentialSummary callback (covers Play Store and
  desktop-linked paths; the Skus service resolves both internally).

BraveActivity.finishNativeInitialization now calls
requestCredentialSummary on every app start to keep the cache fresh.

Resolves: https://github.com/brave/brave-browser/issues/54791
2026-04-21 22:58:42 +01:00
Jay Harris 8aac786576 [AI Chat]: Add color highlighting (#35710) 2026-04-21 22:48:07 +01:00
Aleksei Seren 39d9920a98 [CodeHealth] Enable clang-tidy and fix violations (#35721)
Add .clang-tidy to browser/serp_metrics and components/serp_metrics
to enforce bugprone, readability, modernize, and performance checks.
Also fix violations surfaced by the new configuration including uppercase literal suffixes,
unused includes, dangling string_view in test fixture, non-static
accessors in tests, and Windows-conditional tests guarded via #if instead
of MAYBE_ macros.
2026-04-21 21:16:09 +01:00
Agustín Ruiz aefa8f7cf4 Use Leo tokens and leo-button in origin page (#35726)
Switch UI styles to Leo design tokens and components in the brave origin settings page. Replaced hard-coded colors, spacing and font values with --leo- tokens, added a subtle top border to #needsRestart, removed legacy dark-mode overrides and custom .primary button styles, and swapped the native restart <button> for a <leo-button kind="filled">. Also added an icon fill color variable for cr-icon in origin_toggle_button and removed some redundant padding rules. These changes standardize styling and migrate to the Leo component system.
2026-04-21 21:10:50 +01:00
cdesouza-chromium 469b21a709 Add best practice: raw_ref<T> vs raw_ptr<T> for non-owning fields (CSM-036) (#35731) 2026-04-21 21:10:37 +01:00
Brian R. Bondy 4dd860c0ae Remove CSM-002 best practice (#35734) 2026-04-21 16:08:30 -04:00
Brian R. Bondy efab59a346 Update Brave Origin copy (#35717) 2026-04-21 14:51:30 -04:00
brave-buildsandbrave-builds-ro e7112c0232 Roll perf profiles update (update-perf-profile-2026-04-21-16-16) (#35720)
* Update perf profile brave-typical-mac using v1.91.83
* Update perf profile brave-typical-android using v1.91.79
* Update perf profile chrome-typical-mac using v1.91.83
* Update perf profile chrome-typical-android using v1.91.79
* Update perf profile brave-typical-win using v1.91.88
* Update perf profile chrome-typical-win using v1.91.88
---------

Co-authored-by: brave-builds-ro <devops+robuilds@brave.com>
2026-04-21 22:24:18 +04:00
Serg be90a732da [Android] Suppress VPN link-subscription dialog when disabled by policy (#35719)
BraveActivity shows LinkVpnSubscriptionDialogFragment when a VPN
subscription is detected on the device and the link dialog has not yet
been shown. The guard did not consult the VPN policy pref, so the dialog
was presented even to users whose VPN has been disabled by policy (e.g.
Brave Origin users with VPN turned off at the policy layer).

Add !BraveVpnPolicy.isDisabledByPolicy(mTabModelProfileSupplier.get()) to
the guard.

Resolves: https://github.com/brave/brave-browser/issues/54786
2026-04-21 18:46:54 +01:00
brave-builds a5693ab117 1.91.91 2026-04-21 16:22:23 +00:00
Terry Mancey 2e1dfa0324 [ads][CodeHealth] Change token callback typedefs to pass lists by const reference (#35695)
Change GetConfirmationTokensCallback and GetPaymentTokensCallback
typedefs to pass the token list by const reference instead of by value,
update the handler signatures accordingly, and drop the now-redundant
std::move calls into Set and SetTokens. No behavioral changes.
2026-04-21 17:18:16 +01:00
brave-builds 1f4a466d24 1.91.90 2026-04-21 16:03:26 +00:00
Darnell Andries 0cb3ffc6a4 Revert to old format for Rewards ad types metric (#35649) 2026-04-21 08:23:32 -07:00
Aleksei Seren f778f3623b Make SerpMetrics specific copy of TimePeriodStorage (#35697)
serp_metrics makes its own copy of the time_period_storage types
with SerpMetrics prefixed names to allow adding new functionality
that is not compatible with existing interfaces and to reduce the
risk of breaking existing P3A functionality.
2026-04-21 10:10:09 -05:00
Simon Hong 1c59e73d37 Make PageActionView's background transparent by default (#35714)
Resolves brave/brave-browser#54736

Chromium renders a solid rounded-rect background when a page action chip expands
to show its label. Brave doesn't use this background, so override
GetBackgroundColor() in the chromium_src layer to return SK_ColorTRANSPARENT
instead of falling through to the Chromium color token.

Per-action overrides via PageActionController::OverrideChipColors() are still
respected — the override path is checked first and takes precedence over the
transparent default.

Also, don't use tonal color for PageActionView's bg/fg colors when expanded.
2026-04-21 22:56:33 +09:00
Terry Mancey 1a3f6670af [ads][CodeHealth] Remove redundant static_assert from internal headers (#35694)
Internal headers are already gated by BUILD.gn deps so the
ENABLE_BRAVE_ADS static_assert is redundant and causes build failures
when the header is transitively included from an always-built target.

No behavioral changes.
2026-04-21 08:46:12 -05:00
Sangwoo Ko 984aa685d2 [Tree Tabs] Don't access the opener collection if it's not in the same window. (#35575)
Don't accessing the opener collection if it's not in the same window.

When a link is opened from a PWA window, the opener collection is not
in the same window. - link can be opened in normal window type from
PWA window. In this case, we should not try accessing the opener collection.
2026-04-21 14:39:10 +01:00
Terry Mancey b384f027d6 [ads][CodeHealth] Add new clang-tidy checks (#35690)
Adds checks for IWYU, signed/unsigned comparison safety, explicit
enum initial values, and redundant inline specifiers. Disables
misc-use-internal-linkage as it fires false positives on GTest TEST()
macro-generated classes that intentionally require external linkage for
test registration. Disables readability-avoid-return-with-void-value.
2026-04-21 08:21:37 -05:00
Terry Mancey 585ad7e4b7 [ads][CodeHealth] Replace RunUntilIdle with RunUntil in text classification tests (#35696)
RunUntilIdle only drains tasks already queued at the point of the
call, making tests fragile. Sad-path tests for no loaded resource
and empty input need no async wait as processing is synchronous in
those cases. Happy-path tests now use RunUntil with an explicit
completion condition so they proceed only after async work finishes.
No behavioral changes.
2026-04-21 08:20:15 -05:00
Terry Mancey 1072c63a68 [ads][CodeHealth] Prevent instantiation of static-only factory classes (#35693)
Static-only factory classes were missing the Chromium convention of
explicitly deleting the default constructor, copy constructor, and copy
assignment operator with a preceding comment. Added these deletions to
all eight factory classes and removed what-comments from the two URL
request builder interfaces. A follow-up will convert single-method
static-only factory classes to free functions where appropriate.
2026-04-21 08:15:18 -05:00
brave-builds 80340ddf37 1.91.89 2026-04-21 12:33:54 +00:00
brave-builds 0a347b7e54 1.91.88 2026-04-21 12:03:25 +00:00
Brian R. Bondy fe0b0c3173 Hide Survey Panelist when rewards is disabled by admin policy (#35663)
The previous fix (brave/brave-core#35600) used
brave_origin::IsBraveOriginPurchased() which calls
PrefService::GetBoolean() directly. This crashed because the ads code
calls UserHasOptedInToSurveyPanelist() from a DB worker thread via
Mojo, violating PrefService's UI-thread sequence check.

Instead, gate Survey Panelist on the BraveRewardsDisabled admin policy
pref (kDisabledByPolicy). Origin builds set this policy so the effect
is the same, but the pref access in the ads internal code goes through
GetProfileBooleanPref() → Mojo IPC, which is thread-safe.

Resolves https://github.com/brave/brave-browser/issues/54584
Resolves https://github.com/brave/brave-browser/issues/54718
2026-04-21 07:34:04 -04:00
brave-builds b2c01c0521 1.91.87 2026-04-21 11:24:37 +00:00
brave-builds ea30629477 1.91.86 2026-04-21 10:59:55 +00:00
brave-builds 9daad7ef7d 1.91.85 2026-04-21 10:36:06 +00:00