This adds a JavaScriptFeature that enables the auto highest quality video feature on YouTube videos when using the `UseProfileWebViewConfiguration` feature flag
After the deferred ad viewed event is triggered, the handler pointer must
always be reset to signal the deferred state is fully resolved. absl::Cleanup
guarantees the reset on all scope exit paths.
Introduces enable_playlist (defaults to !is_brave_origin_branded),
following the same pattern as enable_brave_wallet and enable_ai_chat,
to gate all Playlist code from compilation on origin-branded desktop
builds. enable_playlist_webui now chains through enable_playlist.
Changes are scoped to desktop: iOS and Android don't support
is_brave_origin_branded=true (enforced by asserts in
//brave/components/brave_origin/buildflags/buildflags.gni), so they
have no guards.
The comparator combined two conditions with `&&`, which could leave a
shorter trigger before a longer one when the longer trigger had a lower
score. Because matching consumes the activity log from left to right, a
shorter trigger placed ahead of a longer one could absorb part of the
longer pattern before it had a chance to match, producing an incorrect
score. The fix sorts by sequence length first and uses score as a
tiebreaker, so longer triggers always take priority. A regression test
covers the case where a longer trigger has a lower score than a shorter
suffix trigger.
The GetActive query joined creative_set_conversions with ad_events on
creative_set_id. Because ad_events can have multiple rows per
creative_set_id, the join produced one row per matching ad event. Added
SELECT DISTINCT so the result contains one row per conversion regardless
of how many ad events match.
Add deleted copy constructor and copy assignment operator to classes that
own resources or are not meant to be copied: HashedNGramsTransformation,
ObliviousHttpKeyConfig, and the three scoped test setters for pacing,
timer jitter, and confirmation queue delay.
No behavioral changes.
Use the idiomatic Chromium form `.get()` to extract a raw pointer from
smart pointers (mojo::StructPtr, std::unique_ptr, base::ScopedFILE)
rather than the non-idiomatic `&*` dereference-and-address pattern. The
three `raw_ref` sites are left unchanged because `raw_ref::get()` returns
a reference, not a pointer, so `&*` is the correct form there.
No behavioral changes.
Adds explanatory comments to DUMP_WILL_BE_NOTREACHED calls in the database
layer to make clear they upload non-fatal Backtrace reports without crashing.
Expands the transient error exclusion list from 10 to all 46 extended result
codes across the busy, locked, read-only, I/O, full-disk, and cant-open
families so that environmental OS errors do not generate noise in Backtrace.
Extracts the exclusion logic into IsTransientSqliteError, which masks to the
primary result code using the same bitwise approach as Chromium's
sql::IsErrorCatastrophic.
No behavioral changes.
Mark concrete classes that have no subclasses as final. Covers the ten
challenge_bypass_ristretto value wrappers, the network layer
(HttpClient, ObliviousHttpClientImpl, ObliviousHttpKeyConfig), the ad
serving round-robin, the scoped test timezone helper, and three
browser-layer delegate implementations.
No behavioral changes.
The Survey Panelist toggle and its "Learn more" row remained visible
under Settings -> Brave Shields & privacy for users with an active
Brave Origin subscription.
Extend the existing BRAVE_NTP_BRANDED_WALLPAPER_SURVEY_PANELIST
feature-flag gate in BravePrivacySettings to also require
!BraveOriginSubscriptionPrefs.getIsCredentialSummaryActiveCached() for
both the preference visibility and the settings-search index entry.
Resolves: https://github.com/brave/brave-browser/issues/54853
This migrates the media preference that controls whether or not we automatically set youtube videos to the highest quality to Chromium's preferences. This is required to implement the same JavaScript feature when using profile web view configurations.
Applies a set of code health fixes to the serp metrics time period
storage layer: normalises the pref store constructor interface,
uses C++ references for non-nullable service dependencies, adds
final to concrete classes, relocates test-only headers to test/
subdirectories, and gives test helpers fully qualified names.
Resolvesbrave/brave-browser#52042
Restrict transactions for account-based coins (DOT, FIL, ETH, SOL). Return a
generic error message as is best practice.
The tests directly invoke tx_service methods to avoid child TxManagers from
relying on the account resolver delegate
brave_rewards::features::kBraveRewards is DISABLED_BY_DEFAULT on x86/x86_64
Android official builds, so brave_rewards::IsSupported returned false via
IsDisabledByFeature. After https://github.com/brave/brave-core/pull/35698
moved the IsSupported gate into AdsServiceImpl::CanStartBatAdsService, that
path now suppresses the service in unit tests too and launch_count stays 0.
Force-enable the feature in the fixture so Android tests match the
non-Android path they were written against.
Resolves: https://github.com/brave/brave-browser/issues/54831
ShortcutsBackend initializes asynchronously. When clearBrowsingData() was
called during startup, the backend was still in the INITIALIZING state and
its OnHistoryDeletions handler silently returned early, leaving shortcut
suggestions (clock-icon entries) intact after exit.
Fix by adding a JNI bridge (BraveShortcutsUtils.initThenRun) that waits for
ShortcutsBackend to finish its async DB init via OnShortcutsLoaded() before
invoking clearBrowsingData(). Also move the clear-on-exit call from
initializeState() to finishNativeInitialization() where the profile is
available, and add FORM_DATA (autofill) to the cleared data types.
Resolvesbrave/brave-browser#54523
Add a PolkadotTransactionStatusTask that can be used to crawl the block chain,
probing each block for the provided extrinsic. Assuming the extrinsic is found,
we then parse the events of the block to determine the final status of the
extrinsic along with the true fee withdrawn from the sender's account.
Status tracking can yield 4 different states. If we start crawling too quickly
and outpace the finalized head, we return early. If we probe the entire
mortality window of the extrinsic, we inform the caller that the extrinsic was
not found and should be considered dropped. Otherwise, if we find the extrinsic
within the mortality window, we can accurately determine if it was successful or
failed.
Because we're interested in not leaking information about an address being
restricted, we remove the helper function WalletRestrictedAddressErrorMessage
and in its stead we just use WalletInternalErrorMessage.
Added missing //brave/components/resources:strings dependency to //brave/components/psst/resources:dialog to resolve a build failure.
Signed-off-by: Vadym Struts <vstruts@brave.com>
This adds a base JavaScriptFeature for accessing safe builtins in Brave JS features that require it based on the code in `__firefox__.js`. The main difference here is that this PR only focuses on the builtins (Object, Function, Array) needed for Web3 scripts and does not handle any `toString` overrides (which were only needed for tokenized communication)
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.