290 Commits
Author SHA1 Message Date
Kyle Hickinson 453caf3ce6 [cr149][iOS] Mark CWVWebViewConfiguration.preferences as unavailable
Removes the `NOTREACHED` in `-[CWVWebViewConfiguration preferences]` that is hit in some new `CWVWebView` code, the `NOTREACHED` was originally to avoid developer error in accessing it from Swift, but we can instead just mark it as unavailable with `NS_UNAVAILABLE` to avoid that possibility instead and allow the Obj-C side to just coalesce on null.

Chromium change:

commit 29b0e7808c42609ad6a816161d65acc6d2b46841
Author: Anuj Kumar <anujbh@google.com>
Date:   Fri Apr 17 15:27:16 2026 -0700

    [ios/web_view] Add triggerNonFatalCheck to CWVPreferences

    Adds a new non-persistent, in-memory property 'triggerNonFatalCheck'
    to CWVPreferences. When enabled, it triggers a non-fatal CHECK during
    CWVWebView initialization to facilitate integration testing of
    non-fatal checks by CWV clients.

    Note: All code added in this CL is temporary for release integration
    testing and will be reverted after testing in the stable channel
    concludes.

    The CHECK is implemented as:
    CHECK(false, base::NotFatalUntil::M235); with a distant launch
    milestone to ensure cleanup occurs before it becomes fatal.

    Bug: 503005516
    Change-Id: Ifea699ed37f2760bcc80cc49a71968075c2ad148
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7751665
    Reviewed-by: Justin Cohen <justincohen@google.com>
    Commit-Queue: Anuj Kumar <anujbh@google.com>
    Reviewed-by: John Wu <jzw@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616907}
2026-05-22 16:57:42 -04:00
Emerick Rogul 2bad3ba722 [cr149] Permit cross-host WebUI iframes in CRWWebUISchemeHandler
Upstream's `webView:startURLSchemeTask:` now rejects any WebUI sub-resource
whose `SchemeHostPort` differs from the main `webView.URL` unless it is
served from `chrome://resources`. That breaks Brave's per-frame `WebUIIOS`
support (04db68e84d), where a trusted WebUI page deliberately embeds a
chrome-untrusted (or sibling-host) WebUI iframe (e.g. AI Chat).

Extend the existing chromium_src override to also admit any URL recognized
by a registered `WebUIIOSControllerFactory`. Non-WebUI URLs continue to
fall through to the upstream check, preserving its hardening intent.

Fixes the `WebUITest.LoadWebUIPageWithWebUIChildFrame` integration test.

Note: AI-assisted: requires thorough review

Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/6b67808f449e4e6ebfd00182dcf09c7a37bb75b9

commit 6b67808f449e4e6ebfd00182dcf09c7a37bb75b9
Author: Mike Dougherty <michaeldo@chromium.org>
Date:   Mon Apr 27 02:18:09 2026 -0700

    Correctly pass WebUI headers to resource response

    This CL forwards headers set on URLRequestChromeJob instances inside
    URLDataManagerIOSBackend to the actual response. Previously these
    headers were unintentionally discarded.

    Although set_add_content_security_policy is being explicitly disabled in
    this CL, it represents no change in behavior because the header was not
    previously forwarded to the response.

    Bug: 502503860
    Change-Id: I85b33794a405bf132b094c47e890df0473c1b591
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7764734
    Auto-Submit: Mike Dougherty <michaeldo@chromium.org>
    Commit-Queue: Gauthier Ambard <gambard@chromium.org>
    Reviewed-by: Gauthier Ambard <gambard@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1620954}
2026-05-22 16:57:39 -04:00
AlexeyBarabash 68ac872402 [OSCrypt][Sync] Migrate to async OSCrypt (#36121)
* [BraveSync] Migrate from os_crypt/sync to async

Starting from cr149 components/os_crypt/sync will be
removed completely in a favor of components/os_crypt/async.

Resolves https://github.com/brave/brave-browser/issues/55192
2026-05-07 13:57:19 +03:00
Kyle Hickinson dc769c43d6 [iOS] Fix access of autofill controller in BraveWebView (#35899)
This updates the chromium_src overrides that enable the usage of `CWVAutofillController`, namely removing logic in the `WebView*` types that use `WebViewBrowserState` rather than a dependency injected into the client. This means creating a few new overrides for `IOSWebViewPaymentsAutofillClient` and supplying a different autofill client bridge/driver for the `CWVAutofillController` (via subclass)
2026-04-30 10:28:23 -04:00
Kyle Hickinson 9ae0dc6c0e [iOS] Add missing captive portal tab helper creation (#35999)
This tab helper was converted to `WebStateUserData` in cr147 so it was no longer being created correctly. This change refactors the override to expose the tab helper properly so that it can be created it in `AttachTabHelpers`

Chromium change:

commit b689e19d72624727f68767ca806a1de7044f97a7
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Mon Feb 23 05:15:34 2026 -0800

    [ios] Convert CaptivePortalTabHelper into a WebStateUserData<T>

    With the optimisation to create TabHelper only for realized WebStates,
    it is no longer necessary to use LazyWebStateUserData<T>. Convert the
    class CaptivePortalTabHelper to use WebStateUserData<T> instead.

    Bug: 409299519
    Change-Id: Ib14babdf5bd6f1ea43b494f4ccce62e43084e3d8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7594552
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
    Commit-Queue: Federica Germinario <fedegermi@google.com>
    Reviewed-by: Federica Germinario <fedegermi@google.com>
    Cr-Commit-Position: refs/heads/main@{#1588636}
2026-04-30 10:09:03 -04:00
Kyle Hickinson d1a9c0b80a [iOS][cr148] Add new IOSAccountSettingServiceFactory registration
Chromium change:
https://chromium-review.googlesource.com/c/chromium/src/+/7684174

commit f6920787716026fa2da62cf1532492628c9743b6
Author: Alexis Hétu <sugoi@chromium.org>
Date:   Tue Mar 24 09:01:29 2026 -0700

    [iOS] Enable sync of Wallet related data on iOS

    This CL enables the components code on iOS for wallet related
    data, settings and valuables.

    In ios/, it sets the required AccountSettingService in
    CommonControllerBuilder to make wallet sync work.

    Bug: 493865594
    Change-Id: Iffec63ac25583e243b6c3b922e9a8b03ee5bc272
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7684174
    Reviewed-by: Norge Vizcay <vizcay@google.com>
    Reviewed-by: Will Harris <wfh@chromium.org>
    Commit-Queue: Alexis Hétu <sugoi@chromium.org>
    Reviewed-by: Rushan Suleymanov <rushans@google.com>
    Cr-Commit-Position: refs/heads/main@{#1604167}
2026-04-27 12:01:02 +01:00
Kyle Hickinson d26b3f9e33 [iOS] Add support for using Chromiums translation controller (#35055)
This implements the required method in `BraveWebView` to access the embedded `CWVTranslationController`. The controller will only function correctly when `UseProfileWebViewConfiguration` is enabled since it requires the Chromium JavaScript features to be injected.
2026-03-31 16:06:59 -04:00
Max Karolinskiy 247c970713 [cr147][iOS] LazyWebStateUserData<T> has been removed.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/a5a6bc4b29a9a

commit a5a6bc4b29a9a1c2dd75775f30c0937424218c5c
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Mon Feb 23 09:14:05 2026 -0800

    [ios] Remove unused and deprecated template LazyWebStateUserData<T>

    This class is no longer useful since the WebStateUserData<T> are
    only created when the WebState becomes realized.

    Bug: 409299519
2026-03-26 19:25:23 -04:00
Szilard Szaloki 01575cee8a Add AddInteger() and AddDouble() methods to WebUIIOSDataSource/WebUIIOSDataSourceImpl (#34685) 2026-03-13 08:07:53 +09:00
Kyle Hickinson dadd42f442 [iOS] Expose private tracking state for if a restore is occuring (#34458)
This adds a new override on `web::NavigationManager` to expose the private field in `NavigatonManagerImpl`: `native_restore_in_progress_`. This field can be used the same way `TabState.isRestoring` was used on the Swift side which is a requirement for moving certain logic done in the Swift side into WebState tab helpers.
2026-03-06 10:59:11 -05:00
Emerick Rogul 2f55156f25 [cr146][ios] Supervised user settings service renamed to family link
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/97b35f324629e1c84577db7a7c625213ecb24bf7

commit 97b35f324629e1c84577db7a7c625213ecb24bf7
Author: Tomek Jurkiewicz <tju@google.com>
Date:   Tue Jan 20 05:14:00 2026 -0800

    Rename Supervised User settings service and data type to family link.

    This renaming aims at better reflecting service's function in the wake
    of multiple user supervision systems: this service exclusively handles
    supervision settings related to family link users.

    "Supervised user" relates to any parental controls type, and "Family
    Link" is a specific one.

    Minor: declare supervised_user namespace for the service and its
    factory.

    BYPASS_LARGE_CHANGE_WARNING=Gerrit is not picking up renaming

    Bug: 475731719
    Bypass-Check-License: Renaming
    Change-Id: Icc59347f6e1a515db6fb1d53d2f7b60adba32089
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7493784
    Reviewed-by: Mark Cogan <marq@chromium.org>
    Reviewed-by: Rushan Suleymanov <rushans@google.com>
    Commit-Queue: Tomek Jurkiewicz <tju@google.com>
    Cr-Commit-Position: refs/heads/main@{#1571571}
2026-02-26 13:47:49 +00:00
Emerick Rogul 93b7a2f1fe [cr146] IsAccountStorageEnabled -> IsAccountStorageActive
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/5fc7f71fe0a8331c7d9b1d6f17c003d6718454bc

commit 5fc7f71fe0a8331c7d9b1d6f17c003d6718454bc
Author: Thomas Thrainer <thomasth@google.com>
Date:   Thu Jan 22 06:55:33 2026 -0800

    Rename `IsAccountStorageEnabled()` to `IsAccountStorageActive()`

    This follows the renaming of
    `feature_utils::IsAccountStorageEnabled(...)` to
    `features_utils::IsAccountStorageActive(...)` which was done in
    https://crrev.com/c/7277057.

    Bug: 469954506
    Change-Id: I95299f56fd0e04593338f93a5a0c66276a6a6964
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7278259
    Reviewed-by: Gauthier Ambard <gambard@chromium.org>
    Reviewed-by: Ioana Treib <ioanap@chromium.org>
    Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
    Commit-Queue: Thomas Thrainer <thomasth@google.com>
    Reviewed-by: Rafał Godlewski <rgod@google.com>
    Cr-Commit-Position: refs/heads/main@{#1572971}
2026-02-26 13:47:48 +00:00
Kyle Hickinson ea5c7c79f5 [iOS] Allow additional setup after the web view configuration is reset (#34087)
This adds a temporary WebClient method–exposed through `BraveWebView`–that will allow Brave to perform additional changes to the underlying `WKWebViewConfiguration ` when said configuration is reset in `WKWebViewConfigurationProvider`.  This is a requirement for being able to add the `internal` scheme handler and adjust a few WebKit preferences still controlled by Brave when the `UseProfileWebViewConfiguration` feature flag is enabled.
2026-02-24 09:42:55 -05:00
Kyle Hickinson 943ac9623e [iOS] Expose methods to add/remove credit cards in autofill data manager (#33808)
This change adds a category on `CWVAutofillDataManager` to expose additional methods to add & remove local credit cards from the `PaymentsDataManager`
2026-02-10 10:45:53 -05:00
Kyle Hickinson d62634a1e4 [iOS] Move Brave Sync NetworkTimeHelper setup to PreMainMessageLoopRun (#33756)
This fixes a crash where sync setup is started and accesses `brave_sync::NetworkTimeHelper` before it has set a task runner.
2026-02-06 23:06:35 +00:00
cdesouza-chromium f5c6a0136f [CodeHealth] Use base::DictValue/base::ListValue - Part I (#33614)
These classes were hoisted and renamed. This has been replaced in
Chromium as well. This is a mechanical change for Brave, done with the
following script.

```
git grep -lw 'Value::List' | xargs sed -i 's/\bValue::List\b/ListValue/g'
git grep -lw 'Value::Dict' | xargs sed -i 's/\bValue::Dict\b/DictValue/g'
git cl format
```

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/6bc468d481835992696083e99e556516fb7f5f80

```
commit 6bc468d481835992696083e99e556516fb7f5f80
Author: Avi Drissman <avi@chromium.org>
Date:   Thu Jan 29 22:14:50 2026 -0800

    Remove aliases for base::DictValue and base::ListValue

    This removes a few last stragglers as well.

    Fixed: 478100525
    Cq-Include-Trybots: luci.chromium.try:win-official,mac-official,linux-official,android-official,android-desktop-x64-official
    Change-Id: If92142b8ab0562a82c609b71c6b2a7665cea6ec6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7513889
    Auto-Submit: Avi Drissman <avi@chromium.org>
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Owners-Override: Daniel Cheng <dcheng@chromium.org>
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1577038}
```

Issue: https://github.com/brave/brave-browser/issues/52435
2026-02-04 12:54:52 -03:00
Kyle Hickinson 103b72a846 [iOS] Introduce browser policy connector overrides (#33092)
This adds patches & overrides in order to install Brave's policy provider at an app and profile level.

These changes attempt to match desktop/android's existing overrides, specifically:
- `patches/chrome-browser-policy-profile_policy_connector.cc.patch`
- `chromium_src/chrome/browser/policy/chrome_browser_policy_connector.h`
- `chromium_src/chrome/browser/policy/chrome_browser_policy_connector.cc``
- `chromium_src/chrome/browser/policy/profile_policy_connector.cc`
- `chromium_src/chrome/browser/policy/profile_policy_connector.h`
- `chromium_src/chrome/browser/policy/profile_policy_connector_builder.cc`
2026-01-12 16:13:38 -05:00
Emerick Rogul 53bd9ab056 [cr144][ios] SessionState no longer used
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e40d536b015fdf7da2bf59b38e2a29dfab227bf6

commit e40d536b015fdf7da2bf59b38e2a29dfab227bf6
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Thu Nov 6 09:30:59 2025 -0800

    [ios] Remove session_state legacy target

    This code is no longer used and can be removed.

    This is part of a multi-CLs change:
      - https://crrev.com/c/6979449
      - https://crrev.com/c/6979586
      - https://crrev.com/c/6979667
      - https://crrev.com/c/6979626
      - https://crrev.com/c/6983123
      - https://crrev.com/c/6983202
      - https://crrev.com/c/7074893
      - https://crrev.com/c/6983024
      - https://crrev.com/c/6983144
      - https://crrev.com/c/6982943
     => https://crrev.com/c/6983445
      - https://crrev.com/c/6983504
      - https://crrev.com/c/6983010
      - https://crrev.com/c/6983050
      - https://crrev.com/c/6983423
      - https://crrev.com/c/6983287
      - https://crrev.com/c/7003327
      - https://crrev.com/c/7002783
      - https://crrev.com/c/7002962
      - https://crrev.com/c/7003743
      - https://crrev.com/c/7003123
      - https://crrev.com/c/7003225
      - https://crrev.com/c/7003227
      - https://crrev.com/c/7003087
      - https://crrev.com/c/7027213

    Bug: 40945317
    Change-Id: I9e87943d682e822aa8d2adb0a53fabe63b33b1c2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6983445
    Reviewed-by: Federica Germinario <fedegermi@google.com>
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1541279}
2025-12-20 23:56:19 +00:00
Claudio DeSouza 5274bd6cf3 [cr143][ios] web_ui_url_constants.cc deleted
The values have been moved to the header, and made `constexpr`,
therefore the value in our own shadow file should also be moved to the
header.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1683e4329a3d271cd98620fe85d1bf38b67c75dc

commit 1683e4329a3d271cd98620fe85d1bf38b67c75dc
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Fri Oct 17 02:30:17 2025 -0700

    [ios] Modernize definition of //ios/components/webui constants

    Declare the constants as `inline constexpr char kConstant[] = "...";`
    in the header (this allow initializing other constexpr constants from
    them).

    Bug: none
    Change-Id: Iae79669bf5d16042c9cdc66247cd88ee878b7521
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7046203
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1531309}
2025-11-18 11:26:21 -05:00
Claudio DeSouza 13a2651e70 [cr143] GURL::*_piece() removed
All the main methods now return a string_piece, which made the `_piece`
functions redundant.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/566074ac1aee3a91cbec0d2eac3120b7dd71860b

commit 566074ac1aee3a91cbec0d2eac3120b7dd71860b
Author: Charlie Harrison <csharrison@chromium.org>
Date:   Mon Oct 6 19:18:05 2025 -0700

    Remove GURL::*_piece() method

    There are no more users of this deprecated and misnamed API.
    This completes phase 1.5 of crbug.com/448174617.

    Bug: 448174617
    Change-Id: I82918ec4ec10b68729c31cb36487c7cb02ad0b56
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7008912
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Owners-Override: Charlie Harrison <csharrison@chromium.org>
    Owners-Override: Daniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1525986}
2025-11-18 11:18:46 -05:00
Claudio DeSouza 51604f40d0 [cr143] Several GURL methods returning string_view
This migration has been effected in upstream, but several places in our
codebase got broken by this transition. This change makes several parts
of our codebase more friendly to passing `string_view`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0e1784e3cf990560b173f40338e582f50aba0e85

commit 0e1784e3cf990560b173f40338e582f50aba0e85
Author: Charlie Harrison <csharrison@chromium.org>
Date:   Fri Oct 3 11:04:26 2025 -0700

    RELAND: Migrate GURL::path() and friends to return string_view

    This relands crrev.com/c/7003625. Missing cases were found by staring
    at the output of `git grep` for the whole codebase.

    Origin description:
    Also migrates some last remaining callers of the std::string APIs.
    This completes phase 1 of crbug.com/448174617.

    Bug: 448174617
    Change-Id: I7f24f81d1fbf129d8b0dd94f4cf948626deab933
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7007010
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Commit-Queue: Charlie Harrison <csharrison@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1524878}
2025-11-18 11:18:41 -05:00
Aleksei Khoroshilov d579143499 Prepare for native Siso build. (#32307) 2025-11-18 18:01:58 +07:00
Kyle Hickinson e27f6af854 [iOS] Expose originating host & redirected url for Chromium download tasks (#31921)
This change introduces a chromium_src override to expose the internal `web::DownloadTask` so that we can expose some values that are not currently wrapped in the `CWVDownloadTask` type.

This commit can be reverted when the change is upstreamed and pulled down in future Chromium bumps
2025-10-20 14:03:15 -04:00
Claudio DeSouza dc91f12982 [ios][cr142] kSessionStorageKey deleted
As this legacy session storage is gone, the references for it are also
being removed.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d05fb4e422f6e50551293f74ed3cd830c5d39811

commit d05fb4e422f6e50551293f74ed3cd830c5d39811
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Thu Sep 25 01:59:48 2025 -0700

    [ios][WebView] Remove support for legacy session storage

    The support for optimized session storage has launched in all client
    of this code, so remove support for loading the legacy format and to
    migrate to the new one.

    Bug: 40945317
    Change-Id: I7d080b33a5078825796f41f8f08a2832dfd3ba86
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6973946
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
    Reviewed-by: Hiroshi Ichikawa <ichikawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1520448}
2025-10-15 20:31:22 -04:00
Emerick Rogul d37bbaed40 [cr142][ios] webView property is now CRWWebView
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/79af3c2a420e5999b6df721b998cac5a06c71faf

commit 79af3c2a420e5999b6df721b998cac5a06c71faf
Author: Aliona DANGLA <alionadangla@google.com>
Date:   Mon Sep 22 04:52:39 2025 -0700

    [iOS] Add and observe WKWebView.obscuredContentInsets property

    This change introduces a new property to handle `obscuredContentInsets`,
    a new API added in the iOS 26 SDK. See the following link for more
    information:
    https://developer.apple.com/documentation/webkit/wkwebview/obscuredcontentinsets?language=objc

    This property allows the web view to account for areas obscured by other
    UI elements, such as toolbars.

    Observing this value is a necessary step in the larger "Bling Fullscreen
    refactoring" project for iOS 26. This CL provides the foundation for
    correctly adjusting the viewport insets when content is obscured.

    This is part of multiples changes
    * https://crrev.com/c/6839620 | [iOS] Implement fullscreen with obscured inset in iOS 26
    * https://crrev.com/c/6853827 | [iOS] Add fullscreen resizing type enum
    * ➔ https://crrev.com/c/6827602 | [iOS] Add obscured inset property (Current CL)

    Bug: 438144976
    Change-Id: I90b85d0d7bcefe7fa87f9257dbf3f84af56bb974
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6827602
    Commit-Queue: Aliona Dangla <alionadangla@chromium.org>
    Reviewed-by: Gauthier Ambard <gambard@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1518630}
2025-10-15 20:31:11 -04:00
Emerick Rogul 46dbe5fe34 [cr142][ios] MaterialComponents removed upstream
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5068b9f045eb4ce7a2d57ea33998ddf60bea2a2c

commit 5068b9f045eb4ce7a2d57ea33998ddf60bea2a2c
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Fri Sep 19 09:03:38 2025 -0700

    [ios] Remove MaterialComponents and its dependencies

    Those libraries are no longer used, so remove them from DEPS and
    git submodules.

    This is part of a multi CL change:
     -  http://cl/808555604
     -  https://crrev.com/i/8602518
     => https://crrev.com/c/6966159

    Fixed: 443947340
    Change-Id: I05ce8d11347e2cb3225653062dd520384725847b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6966159
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Reviewed-by: Rick Byers <rbyers@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1517995}
2025-10-15 20:31:06 -04:00
Claudio DeSouza 4a687df72c [ios][cr142] RegisterBrowserStatePrefs => RegisterProfilePrefs
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f054cf6e4083bcebd25428f40297d3356bc8000f

commit f054cf6e4083bcebd25428f40297d3356bc8000f
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Wed Sep 3 08:49:57 2025 -0700

    [ios] Rename RegisterBrowserStatePrefs() to RegisterProfilePrefs()

    This convert files in //ios/chrome/browser/metrics/model.

    Bug: 436484783
    Change-Id: I408fdfcea1e5d94e254dc1dac265e0d35b5ae918
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6903973
    Reviewed-by: Asami Doi <asamidoi@chromium.org>
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1510275}
2025-10-15 18:31:54 -04:00
Claudio DeSouza f691ec1ef6 [cr142][ios] BuildServiceInstanceFor using ProfileIOS
This is a simple function signature correction.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/51e89f623c0c6ef196225a84fd3fad42ae6f54b4

commit 51e89f623c0c6ef196225a84fd3fad42ae6f54b4
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Fri Sep 5 11:37:22 2025 -0700

    [ios] Convert factories to BuildServiceInstanceFor(ProfileIOS*)

    {Refcounted,}ProfileKeyedServiceFactoryIOS exposes a method
    BuildServiceInstanceFor(ProfileIOS*) so convert factories
    to override this method instead of the deprecated method
    BuildServiceInstanceFor(web::BrowserState*).

    This convert factories in //ios/chrome/browser/metrics/model.

    Bug: 436484783
    Change-Id: I62cdee5338106ed3c824fb61bdf546ca4cf51c02
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6912798
    Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1511760}
2025-10-15 18:31:54 -04:00
Kyle Hickinson 96dde0f6b8 [iOS] Show "Force Paste" edit menu option even with no text selected (#31428)
This change ensures that the menu builder is called even when there is no active text selected by the user so that we can display `Force Paste` next to the standard `Paste` when the user is simply attempting to paste into an empty field.
2025-10-01 10:15:20 -04:00
Kyle Hickinson 971ce56871 [iOS] Support using CWVWebView autofill with Chrome factories (#30166)
This change adds the required overrides & subclasses to use the pre-wrapped `CWVAutofillController` & related classes with `BraveWebView`
2025-09-26 10:00:08 -04:00
Max Karolinskiy 2a39c4101e Upgrade from Chromium 140 to Chromium 141 (#30537)
Resolves https://github.com/brave/brave-browser/issues/48214
2025-09-22 17:49:03 -04:00
Nuo Xu 1d20b0d701 feat(iOS): Override for Chromium's Content Rule List (#31309)
* Override for Chromium's Content Rule List

Chromium's content rule list will block all external links so that webui cannot open. We need override it to unlock external links so that our webui can open external links.

* formatting

* update new lines
2025-09-22 12:38:19 -07:00
Claudio DeSouza 1554793cdf [cr141][ios] Fix AutofillClientIOS::Create override
This change in the argument list is of no consequence.

commit 4872f010a3dea54020cfab52049604d8f4780afb
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Wed Aug 27 09:06:36 2025 -0700

    [ios] Improve AutofillClientIOS::FromWebState(...)

    Instead of storing a set of function pointer, and calling the in order,
    use an helper class to attach an instance of AutofillClientIOS to the
    WebState.

    This is an intermediate step on the way to convert AutofillClientIOS in
    a tab helper (which will fix the WebViewAutofillClientIOS lifetime).

    This first step fixes a crash where some test where registering function
    that would crash if no AutofillClientIOS was created (in fact any test
    that would create an AutofillTabHelper may cause later tests to crash
    if they tried to access to the AutofillClientIOS, this would depend on
    the ordering of the function pointers registered in the set).

    Bug: 441444002
    Change-Id: I59c4ef2e44eee1c61c1b7f4fc7881309064bb968
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6890091
    Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
    Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
    Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1507117}
2025-09-22 15:00:00 -04:00
Claudio DeSouza 73b1003b6b [cr141][ios] Remove deleted prerender inclusion
This was potentially included to preemtp substitutions.

commit 49070328441e905c8cab66f2a3b7ba724ad5dd2e
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Mon Aug 25 09:25:04 2025 -0700

    [ios] Implement PrerenderBrowserAgent without using PrerenderService

    Implement PrerenderBrowserAgent directly without delegating to the
    PrerenderService and remove the now obsolete PrerenderService class.

    Bug: 40726702
    Change-Id: Ie82def0522c0c35cccbed174c312b1a2e8d8a16b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6850951
    Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
    Commit-Queue: Mark Cogan <marq@chromium.org>
    Reviewed-by: Mark Cogan <marq@ch
2025-09-22 14:59:59 -04:00
Kyle Hickinson 04db68e84d [iOS] Support per-frame WebUI's in WebState (#31259)
This change replaces WebState's `*WebUI` related methods with ones that allow storing a set of WebUI's such that WebUI's can create child frames that also load WebUI which can be necessary for untrusted frames.
2025-09-20 02:36:20 +09:00
Kyle Hickinson 393be6e426 [iOS] Add main frame fallback for mojo facade watcher callback (#31265)
This ensures that if a frame can't be found with the given id it falls back to the main frame so that mojo can handle the callback correctly even if it will error later.
2025-09-18 09:36:55 -04:00
Kyle Hickinson 377dca3a3a [iOS] Handle multiple frames correctly in MojoFacade (#31184)
This change adds the frame ID for the facade handling mojo communications calls so that it may execute responses on the correct frame. This is a requirement for WebUI that may have child frames that also use mojo binding.
2025-09-15 12:48:33 -04:00
Kyle Hickinson d9b5888b2a [iOS] Use Chromium safari data import implementation (#31060)
This change replaces the custom parsing & logic used to import Safari data with Chromium's implementation.
2025-09-08 17:18:22 -04:00
Kyle Hickinson deb707b7dd [iOS] Add missing IOSChromeAimEligibilityServiceFactory to dependencies (#30921)
This adds a new factory to the dependencies list created in Chrome's `EnsureProfileKeyedServiceFactoriesBuilt`.

`IOSChromeAimEligibilityService::IsAimLocallyEligible` returns false so no Aim features are enabled
2025-08-29 13:16:50 +09:00
Kyle Hickinson c78b6f9620 fixup! [cr140][ios] IOSChromeSyncedTabDelegate::CreateForWebState takes a SessionID 2025-08-20 01:07:04 +03:00
Emerick Rogul 9f4308e449 [cr140][ios] IOSChromeSyncedTabDelegate::CreateForWebState takes a SessionID
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d7b2a0942e5a6955f27950d2201d4965901cf837

commit d7b2a0942e5a6955f27950d2201d4965901cf837
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Wed Jul 16 05:32:22 2025 -0700

    [ios] Improve creation/destruction of IOSChromeSyncedTabDelegate

    Move creation of the IOSChromeSyncedTabDelegate from AttachTabHelpers
    to SyncedWindowDelegateBrowserAgent when the WebState is inserted in
    the WebStateList, and destroy it when it is removed.

    This allow changing the SessionID corresponding to the window into a
    constant (it is known when the object is created) and ensure that it
    is always valid for the lifetime of the object.

    Bug: 409299519
    Change-Id: Ibcced453c1b3b5ef335a64de7214a5144c0125ca
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6734760
    Reviewed-by: Mark Cogan <marq@chromium.org>
    Commit-Queue: Mark Cogan <marq@chromium.org>
    Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1487553}
2025-08-19 19:54:25 +01:00
Emerick Rogul b6cf9a9b91 [cr140][ios] Use IOSChromeSyncedTabDelegate to set window id
`IOSChromeSessionTabHelper` is now removed upstream, so use
`IOSChromeSyncedTabDelegate` to set the window id now.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/740997ee78781dbfe8830047554de4497c4ebc2d

commit 740997ee78781dbfe8830047554de4497c4ebc2d
Author: Sylvain Defresne <sdefresne@chromium.org>
Date:   Wed Jul 9 05:06:12 2025 -0700

    [ios] Remove IOSChromeSessionTabHelper class

    This tab helper was only used to store the tab's window identifier
    which was used by IOSChromeSyncedTabDelegate and HistoryTabHelper.

    Instead store the value in IOSChromeSyncedTabDelegate and change
    HistoryTabHelper to access it from that object instead.

    Fixed: 430235574
    Change-Id: I403eab9246cac88702800e8c6fbf13177fb2bc2f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6714348
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Reviewed-by: Mark Cogan <marq@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1484262}
2025-08-19 19:54:21 +01:00
Kyle Hickinson 0dba43d06e [iOS] Update browser prefs override to avoid patch/sources.gni (#30539) 2025-08-13 04:13:18 +09:00
StephenHeaps f5a1d7e909 fix(privacy): Refactor Brave Shields Utils into BraveShieldsSettings and to expose iOS (#30033)
* Expose Brave Shields Utils to iOS
- Create new `BraveShieldsSettings` class to expose Brave Shield utility apis for per-domain Shield settings and global/default settings.
- Add obj-c wrapper for `BraveShieldsSettings` to expose to iOS, structured within the component.
- Move some of the duplicated function logic from `BraveShieldsTabHelper` to
  `BraveShieldsSettings` so more logic can be shared and prevent issues with,
  for example, `SetAdBlockMode` calling 2 separate `brave_shields` utility funcs.
- Move shared Shields mojom enums to `shields_settings.mojom`.
- Move logic using shared mojom enums to `BraveShieldsSettings`.
- Expose FingerprintMode to iOS to align with other platforms, but use DCHECK
  to validate it's not used on iOS.
- Add default getter / setter helpers to `BraveShieldsSettings`.
- Remove unregister/register of javascript content setting.
- Use a patch to add iOS platform to javascript content setting.
- In case FingerprintMode setting is sync'd later, map `STRICT_MODE` to `STANDARD_MODE` on iOS.
2025-08-12 10:20:45 -04:00
Darnell Andries ab3d4a3ff6 Remove brave_p3a_enabled buildflag (#30483) 2025-08-06 15:20:15 -07:00
Kyle Hickinson f4b1d75f83 [iOS] Add ability to enable Brave admin policies on iOS (#30089)
* [iOS] Add ability to enable Brave admin policies on iOS

This change also adds the an example of handling the BraveWalletDisabled policy

* fixed code checks

* update property name; bump to cr139 min; other review feedback

* remove patch, update override

* remove unused DEPS file

* update wallet policy unit test since ios now runs component unit tests

* re-add android buildflag check to brave_wallet IsDisabledByPolicy
2025-08-05 20:45:34 +01:00
Brian Johnson f6035f6ca4 hardcode "chrome-untrusted" to fix ios laying violation (#30420) 2025-08-01 09:33:20 -07:00
Brian Johnson 165e7052a7 Fix laying violation for ios/web -> brave/ios/browser (#30414) 2025-08-01 14:44:28 +09:00
Brandon-T 9fd9ae22be [iOS] - Fix Tab Group syncing crash when syncing tab groups from Desktop (#30313) 2025-07-31 10:09:51 -04:00
Aleksei Khoroshilov a41bf5350b Replace "src/" includes with <> in chromium_src. (#30096)
This change updates how brave/chromium_src overrides can reference original files: it adds ability to use #include <...> along with #include "src/...". This is enabled by replacing -I../../brave/chromium_src with -iquote../../brave_chromium_src, which adds an include search path only for #include "..." directives.

With this approach, other files in the build tree can reference brave/chromium_src overrides using #include "...", while the overrides themselves can reference original Chromium files using #include <...>. Since Chromium uses #include "..." for all in-tree files, we can leverage this convention and configure our overrides so that we can drop support for #include "src/" later by removing -I../../.. and making rbe_exec_root modification obsolete (the main goal).
2025-07-24 17:37:44 +07:00