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
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>
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.
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.
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.
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.
* 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
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.
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}
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.
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
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.
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.
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
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.
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.
Resolvesbrave/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.
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.
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.
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.
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.
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.
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