Commit Graph
69754 Commits
Author SHA1 Message Date
Serg 7bcbc8bc21 Brings back upstream search widget on Android (#29416)
This is a revert of https://github.com/brave/brave-core/pull/28753
The reason: we received a lot of feedback from frustrated users that
the widget was very useful.
Resolves: https://github.com/brave/brave-browser/issues/46597
2025-06-05 16:17:04 -04:00
Kyle Hickinson 116a3581d3 [iOS] Update secure content state on page commit using WebKit tabs (#29415)
This ensures that after a commit we evaluate the secure content state again as it relies on the last committed URL
2025-06-05 16:11:02 -04:00
cdesouza-chromium 4a41889aca [CodeHealth] Avoid unnecessary EXPECT_STREQ uses (#29418)
This PR removes a lot of unnecessary uses of `EXPECT_STREQ` combined
with calls to `c_str()`, and converts  these comparisons simply to
`std::string` comparisons using `EXPECT_EQ`. This is functionally the
same, but it is arguably easier to read in general.

Resolves https://github.com/brave/brave-browser/issues/46600
2025-06-05 21:10:34 +01:00
brave-builds 03209ca2bc 1.81.55 2025-06-05 18:22:51 +00:00
aseren 9fc920010c [ads] Survey panelists: iOS (#29400)
* [ads] Survey panelists: iOS

* [ads] Update survey panelist `Learn more` link label
2025-06-05 10:38:52 -07:00
Pavel Beloborodov e7980e4f9e Fixed uncatched crash on extension re-import. (#29413)
* Fixed uncatched crash on extension re-import.
2025-06-05 19:10:44 +02:00
StephenHeaps e38fc2a354 fix(privacy): Resolve errors in Adblock Debug View UI (#29414)
Fix errors in AdBlockDebugView related to the Picker having duplicated items.
2025-06-05 18:49:12 +02:00
brave-builds 1f8f342903 1.81.54 2025-06-05 16:11:18 +00:00
Kevin Smith ca1158965a [Rewards] Remove rewards-image data source (#29325) 2025-06-05 12:00:59 -04:00
Sangwoo Ko 4c2a449a3f [Customize Chrome Panel] Adjust elements in 'Customize chrome > Appearance' panel (#29363)
* Remove preview icon
* Remove 'Brave is managing your new tab page'
* Append theme buton to the end of appearance section

Following the latest design guide, remove preview and move button in appearance panel

### Before
<img width="378" alt="image" src="https://github.com/user-attachments/assets/9cf1dd45-3e8d-47eb-bc16-d8ce78918939" />

### After
<img width="312" alt="image" src="https://github.com/user-attachments/assets/402b36b6-31b7-4842-b035-8f1704a8d8d4" />

Resolves https://github.com/brave/brave-browser/issues/44793
Resolves https://github.com/brave/brave-browser/issues/46466
2025-06-05 17:10:52 +02:00
brave-builds e28811eb2b 1.81.53 2025-06-05 14:45:16 +00:00
Mihai PLESA d58b64bef2 Merge pull request #29412 from brave/fix-getevn-broken-linux-build
Fixing `getenv` linux build failure
2025-06-05 15:42:03 +01:00
Kyle Hickinson 396feeb9ad [iOS] Restore ability to tap link preview in context menu to load page (#29397)
This change adds a new delegate method to `TabDelegate` which allows handling when a context menu preview is tapped and introduces the proper implementation in `TabCWVUIHandler` to call it.
2025-06-05 16:35:58 +02:00
Claudio DeSouza d396876586 Fixing getenv linux build failure
This build failure seems to be a result of a recent IWYU fix for
`string_util.h`, and this particular source relying on transient
inclusions.

This fixes adds the necessary header. Some follow up work will be pushed
to remove all uses of `getenv` in our codebase, as we should be using
the `//base` counterpart.
2025-06-05 15:14:11 +01:00
brave-builds ac11da2100 1.81.52 2025-06-05 12:07:47 +00:00
brave-builds 8f0a0698b0 1.81.51 2025-06-05 12:03:03 +00:00
cdesouza-chromium d05979d19c [iwyu] Fixing inclusions for string_util.h pt.2 (#29378)
Files that use functions from `string_util.h` should include that header
directly instead of relying on transient inclusions.

This is a mechanical change using this script:

```sh
remove_header_if_unused() {
    files=$(git grep -l "base/strings/string_util.h")
    for file in $files; do
        if ! git grep -qE "base::MakeStringPiece|base::MakeWStringView|base::ToLowerASCII|base::ToUpperASCII|base::CompareCaseInsensitiveASCII|base::EqualsCaseInsensitiveASCII|base::EmptyString|base::RemoveChars|base::ReplaceChars|base::TrimPositions|base::TrimString|base::TruncateUTF8ToByteSize|base::TrimWhitespace|base::CollapseWhitespace|base::ContainsOnlyChars|base::IsStringUTF8|base::IsStringASCII|base::EqualsASCII|base::CompareCase|base::StartsWith|base::EndsWith|base::RemovePrefix|base::RemoveSuffix|base::IsAscii|base::IsUnicodeControl|base::IsHexDigit|base::IsUnicodeWhitespace|base::FormatBytesUnlocalized|base::ReplaceFirstSubstringAfterOffset|base::ReplaceSubstringsAfterOffset|base::WriteInto|base::JoinString|base::ReplaceStringPlaceholders|base::MakeStringViewWithNulChars" "$file"; then
            sed -i '/base\/strings\/string_util.h/d' "$file"
            echo "Removed 'base/strings/string_util.h' from $file"
        fi
    done
}

add_header_if_needed() {
    files=$(git grep -lE "base::MakeStringPiece|base::MakeWStringView|base::ToLowerASCII|base::ToUpperASCII|base::CompareCaseInsensitiveASCII|base::EqualsCaseInsensitiveASCII|base::EmptyString|base::RemoveChars|base::ReplaceChars|base::TrimPositions|base::TrimString|base::TruncateUTF8ToByteSize|base::TrimWhitespace|base::CollapseWhitespace|base::ContainsOnlyChars|base::IsStringUTF8|base::IsStringASCII|base::EqualsASCII|base::CompareCase|base::StartsWith|base::EndsWith|base::RemovePrefix|base::RemoveSuffix|base::IsAscii|base::IsUnicodeControl|base::IsHexDigit|base::IsUnicodeWhitespace|base::FormatBytesUnlocalized|base::ReplaceFirstSubstringAfterOffset|base::ReplaceSubstringsAfterOffset|base::WriteInto|base::JoinString|base::ReplaceStringPlaceholders|base::MakeStringViewWithNulChars")
    for file in $files; do
        ../tools/add_header.py --header '"base/strings/string_util.h"' "$file"
    done
}

remove_header_if_unused
add_header_if_needed

```

Resolves https://github.com/brave/brave-browser/issues/46559
2025-06-05 12:15:02 +01:00
AlexeyBarabash 779bf78f59 [Sync] Cherry-pick of upstream commit to revert CHECKs back to DCHECKs (#29399)
The `CHECK(<expr>, base::NotFatalUntil::M141)` causes thousands
reports at backtrace.
Reverting it here through patch for the case if the next minor c137 bump
will not have the commit. At the upstream it was landed on
`137.0.7151.79`.

Chromium commit
https://source.chromium.org/chromium/chromium/src/+/35b700af4f3e058dbb7b84346e4d293408d09736

[M137] Revert "Sync ProcessorEntity: Upgrade remaining DCHECKs"

Original change's description:
> Revert "Sync ProcessorEntity: Upgrade remaining DCHECKs"
>
> This reverts commit 6752bab9ae006f82bdd1bf73a475ffffd2fa2d00.
>
> Reason for revert: Still crashing on M137
>
> Bug: 408182457, 419310731
> Original change's description:
> > Sync ProcessorEntity: Upgrade remaining DCHECKs
> >
> > This CL upgrades most of the remaining DCHECKs in ProcessorEntity to
> > proper CHECKs, mostly with base::NotFatalUntil::M141.
> > A few that are obviously-valid don't have NotFatalUntil, and one that
> > is questionable is just removed.
> >
> > Also includes some minor other cleanups, like inlining a one-line
> > helper method with a single call site.
> >
> > Bug: 408182457
> > Change-Id: I7e385de3b6d2953ff9cac62f40e3ebb5651219b8
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6461075
> > Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
> > Commit-Queue: Marc Treib <treib@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1448230}
>
> Bug: 408182457
> Change-Id: Ib5d538c4ebd2aabb9cb0cd27416fba02187945cc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6578201
> Auto-Submit: Maksim Moskvitin <mmoskvitin@google.com>
> Commit-Queue: Mikel Astiz <mastiz@chromium.org>
> Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1464694}

Bug: 419802535,408182457,419310731,408182457
Change-Id: Ib5d538c4ebd2aabb9cb0cd27416fba02187945cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6612682

Resolves https://github.com/brave/brave-browser/issues/46539
2025-06-05 11:43:53 +03:00
Jay Harris 0681c27c8b [AI Chat]: Don't destroy conversations while there is an in progress request (#29379)
* [AI Chat]: Don't destroy conversations while there is an in progress request (even if it has no UI bound)

* [AI Chat]: Move tests to AIChatService

* [AI Chat]: Test that finishing generation deletes the conversation

* [AI Chat]: Update comment to indicate the conversation will be unloaded when the request completes

* [AI Chat]: remove |is_request_in_progress|

* [AI Chat]: Update comment about how IsRequestInProgress is being (ab)used
2025-06-05 07:16:40 +02:00
brave-builds 39ffeabc16 1.81.50 2025-06-05 02:52:44 +00:00
Darnell Andries d1464b6cb1 Merge pull request #29382 from brave/p3a-crash-fix
P3A crash fix
2025-06-04 19:14:24 -07:00
Darnell Andries c3e0933e8e Fix for P3A crash 2025-06-04 17:08:30 -07:00
brave-builds 11f4550a4c 1.81.49 2025-06-05 00:03:28 +00:00
Kyle Hickinson 9591d2337c Revert "[iOS] Register P3A metric configuration component (#29390)" (#29401)
This reverts commit 987e63891a.
2025-06-05 00:22:00 +02:00
brave-builds 056c3c73d7 1.81.48 2025-06-04 19:54:54 +00:00
cdesouza-chromium c3899b612c [CodeHealth] Avoid inefficient std::string(other_string.c_str()) (#29386)
This PR fixes a few places where the use of `c_str()` is not required,
and in fact leads to an extra `strlen`-like call.

Resolves https://github.com/brave/brave-browser/issues/46570
2025-06-04 19:53:44 +01:00
brave-builds f63a10aad8 1.81.47 2025-06-04 18:30:53 +00:00
Kyle Hickinson f6dead6f64 [iOS] Fix missing toggle switch for 'Always request desktop mode' pref (#29391)
This switch was accidentally missed when migrating the underlying setting to use Chromium's host content settings
2025-06-04 19:14:36 +02:00
Kyle Hickinson 987e63891a [iOS] Register P3A metric configuration component (#29390) 2025-06-04 18:22:46 +02:00
cdesouza-chromium 8df5afaa2f [iwyu] Fixing inclusions for string_util.h pt.1 (#29376)
Files that use functions from `string_util.h` should include that header
directly instead of relying on transient inclusions.

This is a mechanical change using this script:

```sh
remove_header_if_unused() {
    files=$(git grep -l "base/strings/string_util.h")
    for file in $files; do
        if ! git grep -qE "base::MakeStringPiece|base::MakeWStringView|base::ToLowerASCII|base::ToUpperASCII|base::CompareCaseInsensitiveASCII|base::EqualsCaseInsensitiveASCII|base::EmptyString|base::RemoveChars|base::ReplaceChars|base::TrimPositions|base::TrimString|base::TruncateUTF8ToByteSize|base::TrimWhitespace|base::CollapseWhitespace|base::ContainsOnlyChars|base::IsStringUTF8|base::IsStringASCII|base::EqualsASCII|base::CompareCase|base::StartsWith|base::EndsWith|base::RemovePrefix|base::RemoveSuffix|base::IsAscii|base::IsUnicodeControl|base::IsHexDigit|base::IsUnicodeWhitespace|base::FormatBytesUnlocalized|base::ReplaceFirstSubstringAfterOffset|base::ReplaceSubstringsAfterOffset|base::WriteInto|base::JoinString|base::ReplaceStringPlaceholders|base::MakeStringViewWithNulChars" "$file"; then
            sed -i '/base\/strings\/string_util.h/d' "$file"
            echo "Removed 'base/strings/string_util.h' from $file"
        fi
    done
}

add_header_if_needed() {
    files=$(git grep -lE "base::MakeStringPiece|base::MakeWStringView|base::ToLowerASCII|base::ToUpperASCII|base::CompareCaseInsensitiveASCII|base::EqualsCaseInsensitiveASCII|base::EmptyString|base::RemoveChars|base::ReplaceChars|base::TrimPositions|base::TrimString|base::TruncateUTF8ToByteSize|base::TrimWhitespace|base::CollapseWhitespace|base::ContainsOnlyChars|base::IsStringUTF8|base::IsStringASCII|base::EqualsASCII|base::CompareCase|base::StartsWith|base::EndsWith|base::RemovePrefix|base::RemoveSuffix|base::IsAscii|base::IsUnicodeControl|base::IsHexDigit|base::IsUnicodeWhitespace|base::FormatBytesUnlocalized|base::ReplaceFirstSubstringAfterOffset|base::ReplaceSubstringsAfterOffset|base::WriteInto|base::JoinString|base::ReplaceStringPlaceholders|base::MakeStringViewWithNulChars")
    for file in $files; do
        ../tools/add_header.py --header '"base/strings/string_util.h"' "$file"
    done
}

remove_header_if_unused
add_header_if_needed

```

Resolves https://github.com/brave/brave-browser/issues/46559
2025-06-04 16:15:27 +01:00
aseren 5652fe9124 [ads] Survey panelist: Android (#29360) 2025-06-04 09:04:47 -05:00
Max Karolinskiy f53cb20d4f Updates support links. (#29355) 2025-06-04 06:44:37 -07:00
brave-builds 846d95325a 1.81.46 2025-06-04 12:08:29 +00:00
brave-builds 65b6172bc2 1.81.45 2025-06-04 12:03:48 +00:00
Nuo Xu f683d89e93 feat(iOS) New default favourites based on regions (#29034) 2025-06-04 03:54:45 -07:00
Pavel Beloborodov 5c402f44b0 Import lock dialog now modal. Import profiles button state fixed. (#29341)
* Import lock dialog now modal. Import profiles button state fixed.
* Fixed crash on re-import.
2025-06-04 14:04:34 +07:00
Pavel Beloborodov ef289a2edd Fixed brave shiels panel in incognito. (#29237)
* Fixed brave shiels panel in incognito.
* Ensure that shields p3a is not reported for incognito profiles.
2025-06-04 12:09:26 +07:00
Anton Paymyshev a16df0be4e Prettier for /components/brave_wallet_ui/panel (#29365) 2025-06-04 10:14:59 +07:00
Kyle Hickinson 87a24055a8 [iOS] Save main view context on scene resigning (#29380)
This change ensures that we always save possible mutations that are currently in-memory only (to be fixed in the future) and also allows the `saveAllTabs` to attempt a synchronous update when the app is terminating
2025-06-04 02:43:37 +02:00
brave-builds 462426aafa 1.81.44 2025-06-04 00:03:36 +00:00
StephenHeaps 77e58abf39 fix(privacy): Re-compile engines from cached combined rules when failing to deserialize cached engine on iOS (#29369)
* Fix incorrect [AdblockEngine initWithSerializedData:error:] error flow not returning nil as documentation states.

* Fix incorrect [AdblockEngine initWithRules:error:] error flow not returning nil as documentation states.

* Add debug menu option for corrupting adblock DAT cache.

* Fallback to loading cached plaintext (combined) rule list when failing to load or deserialize from DAT.

* Cleanup cached serialized engine file or combined rules file when failing to compile from the cache.
2025-06-03 18:25:17 -04:00
Anthony Tseng e1f47e3266 Check column existence in MigrateFrom3to4 and fix incorrect test database dump data (#29362) 2025-06-03 12:00:37 -07:00
Kyle Hickinson ce96439a45 [iOS] Handle web process terminating when using Chromium web views (#29368) 2025-06-03 19:30:58 +02:00
Kyle Hickinson 7ed1323efc [iOS] Persist session restoration updates off main (#29357)
This ensures CoreData updates for tabs that are saved when the app is backgrounded happen off the main thread which can cause some hangs with large tab sets and quick multitasking
2025-06-03 12:13:25 -04:00
brave-builds 03e7bcb794 1.81.43 2025-06-03 16:03:13 +00:00
Kyle Hickinson bb6f8e5bc2 [iOS] Do speech recognizer offline availability check off main (#29348)
This moves the `-[SFSpeechRecognizer supportsOnDeviceRecognition]` call to be done off main as its known to block the thread its called and cause hangs.
2025-06-03 09:53:18 -04:00
Kyle Hickinson 4929a57cf3 [iOS] Remove view hierarchy adjustment for backgrounded tab snapshots (#29351)
This removes the code that adds a web view to the view hierarchy in order to make a snapshot as this is no longer necessary and should fix a hang that is caused by when a web view changes windows
2025-06-03 09:52:37 -04:00
Kyle Hickinson 651d225421 [iOS] Optimize recently closed tabs fetch when updating toolbar menus (#29352)
This swaps a call that fetched all of the users recently closed tabs when trying to determine if the action for opening the most recently opened tab should be added to the toolbar to only fetch a single item.
2025-06-03 09:52:29 -04:00
FHantke a66694494b Merge pull request #29316 from brave/pagegraph-security-origin-fix
PageGraph: Improve handling security origin for disconnected subdocuments
2025-06-03 15:26:25 +02:00
brave-builds ba5ae78a6c 1.81.42 2025-06-03 12:11:09 +00:00