Commit Graph
173 Commits
Author SHA1 Message Date
cdesouza-chromium 3bb82b9e52 [plaster] PermissionContextBase migration (#35907)
[plaster] `PermissionContextBase` migration

The introduction of plasters for `PermissionContextBase` gets rid of a
lot of replacement cruft that was really difficult to make sense of.
This change also tweaks the interface for
`BraveCanBypassEmbeddingOriginCheck`, so it can make the plaster simpler
for this substitution too.

The core of this change is to move `PermissionContextBase` in upstream
into `chromium_impl::`, and derive our own implementatiom from that,
which simplifies a lot of the issues with naming replacement everywhere.

Resolves https://github.com/brave/brave-browser/issues/54952
2026-04-28 23:43:52 +01:00
Claudio DeSouza b9701822a8 [cr146] PromptOptions plumbed through PermissionRequestManager
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/62be9fed82911e8e37c4ef6a926590203fef434a

commit 62be9fed82911e8e37c4ef6a926590203fef434a
Author: Antonio Sartori <antoniosartori@chromium.org>
Date:   Thu Jan 22 04:53:38 2026 -0800

    Reland "[permissions] Plumb PromptOptions through PermissionRequestManager"

    This is a reland of commit 7688ee13bc24db46228f4873ecb27f0e9263a315. The cause of the failing test was actually tangential to this CL and is resolved by https://crrev.com/c/7484754.

    Original change's description:
    > [permissions] Plumb PromptOptions through PermissionRequestManager
    >
    > This is the last of a series of CLs that remove PromptOptions from
    > PermissionRequest and instead plumb it through the code, see
    > https://crbug.com/450752868 for more context.
    >
    > This CL removes prompt_options from the PermissionRequest and instead
    > modifies the various methods Accept, AcceptThisTime, Deny, Dismiss and
    > Ignore of PermissionRequestManager to get a PromptOptions parameter.
    >
    > Bug: 450752868, 469397053
    > Change-Id: I145fa50b69596c744be4751d1b8d441573db0379
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7415427
    > Reviewed-by: Andy Paicu <andypaicu@chromium.org>
    > Reviewed-by: Marc Treib <treib@chromium.org>
    > Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1570263}

    Bug: 450752868, 469397053
    Change-Id: Ibf876e0dbc2cda765b9ed8237faff441874ce360
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7486896
    Reviewed-by: Andy Paicu <andypaicu@chromium.org>
    Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
    Reviewed-by: Marc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1572912}
2026-02-26 13:47:47 +00:00
Claudio DeSouza 2779d3d9a7 [cr146] NotifyPermissionSet bundled prompt decision args
All callers have been corrected to reflect the use of the new interface.

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

commit adc93e0df02c18e1b312fc66be183f417f5d4e5f
Author: Antonio Sartori <antoniosartori@chromium.org>
Date:   Thu Jan 15 01:45:34 2026 -0800

    [permissions] Explicitly pass PromptOptions to NotifyPermissionSet

    This is the first of a series of CLs that refactors the code to
    explicitly pass PromptOptions as function argument through the code
    instead of relying on it being attached to the PermissionRequest. This
    CL in particular adds the PromptOptions parameter to
    PermissionContextBase::NotifyPermissionSet and adapts all its call
    sites.

    See https://crbug.com/450752868 for context.

    Change-Id: I852f93d1ca7bc050e0e4fc6a7390d6c7fbfdd942
    Bug: 450752868
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7274677
    Reviewed-by: Andy Paicu <andypaicu@chromium.org>
    Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1569596}
2026-02-26 13:47:45 +00:00
cypt4 110754bdc0 [CodeHealth] Brave wallet provider origin refactoring (#33658)
* [CodeHealth] Refactor permissions origin
1) Pass origin to dApp on construction instead of
resolving it from delegate.
2) Pass origin to iOS panel ui from the core side.
2026-02-16 16:12:11 +04:00
Anton Paymyshev 0976475da3 Refactor wallet permissions (#33209) 2026-02-09 12:59:10 +00:00
cdesouza-chromium 164ed33c3d [CodeHealth] Use base::DictValue/base::ListValue - Part XII (#33721)
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-06 15:03:15 -03:00
cdesouza-chromium 9579407238 [CodeHealth][cr146] base::Contains dissallowed when .contains suffices (#33631)
[CodeHealth][cr146] `base::Contains` dissallowed when `.contains` suffices it

This is being enforced by the compiler through a concept, and it only
applies for cases where `base::Contains` is used without a projection.
This change also carries out IWYU for `base::Contains`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/4a17af8403373b7f7e7546ef61f30dfbe883d617

```
commit 4a17af8403373b7f7e7546ef61f30dfbe883d617
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Tue Jan 13 07:30:34 2026 -0800

    Disallow base::Contains() when contains() or find() methods available

    This is a temporary step towards deleting base::Contains().
    Trying to call base::Contains(foo, bar) will now cause a static
    assertion failure if foo has contains() or find() methods. This
    effectively makes base::Contains() an alias to std::ranges::contains().
    The result is we can replace instances of 'base::Contains' with
    'std::ranges::contains' in upcoming CLs while being sure to not
    regress performance.

    Bug: 470391351
    Change-Id: I8778f435ff8f5b52fb3bf336724f2dfef388907a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7415207
    Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
    Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1568392}
```

Bug: https://github.com/brave/brave-browser/issues/42557
2026-02-04 13:22:50 -03:00
Pavel Beloborodov 2ce409f4d0 Localhost Permission => Local Network Access cleanup (#32910)
Brave's custom localhost access permission feature has been replaced with Chromium's Local Network Access (LNA) feature.
2026-01-20 20:20:32 +07:00
cdesouza-chromium eff677dd37 [IWYU] Dropping several superfluous std inclusions (#32803)
This PR removes several superfluous inclusions for `<map>`, `<vector>`,
and `<string>`. This is a mechanical change.

```bash
git ls-files components | grep '\.h$' | xargs grep -l '<vector>$' | \
  xargs grep -L std::vector | \
  xargs ../tools/add_header.py --remove --header '<vector>'

git ls-files components | grep '\.h$' | xargs grep -l '<string>$' | \
  xargs grep -L std::vector | xargs grep -L std::npos | \
  xargs ../tools/add_header.py --remove --header '<string>'

git ls-files components | grep '\.h$' | xargs grep -l '<map>$' | \
  xargs grep -L std::map | xargs grep -L std::multimap | \
  xargs ../tools/add_header.py --remove --header '<map>'
```

Bug: https://github.com/brave/brave-browser/issues/42212
2025-12-15 07:58:59 +00:00
Brian R. Bondy a4d9248fcb Add enable_brave_wallet gn var and build flag (#32484)
* Add enable_brave_wallet GN variable and build flag

This adds a new GN build flag 'enable_brave_wallet' that can be set to
false to exclude Brave Wallet from the build. The flag is true by default
to maintain current behavior.

Changes include:
- Add enable_brave_wallet declare_args in build/config/BUILDCONFIG.gn
- Create brave_wallet/common/buildflags with ENABLE_BRAVE_WALLET flag
- Update all BUILD.gn and sources.gni files to use the new flag
- Add wallet buildflags dependencies via minimal one-line imports

* Add patches for wallet buildflags in Chromium BUILD files

Adds minimal one-line patches to import wallet buildflags dependencies
in Chromium source files. This allows Chromium code to conditionally
depend on wallet headers.

Patches:
- chrome/browser/ui/hid/BUILD.gn
- net/BUILD.gn
- third_party/blink/common/BUILD.gn
- third_party/blink/public/common/BUILD.gn
- third_party/blink/renderer/modules/permissions/BUILD.gn

* Guard wallet code in Chromium source overrides

Updates chromium_src overrides to conditionally compile wallet-related
code based on enable_brave_wallet flag. This includes:

- Adding DEPS files to allow buildflags dependencies
- Guarding wallet permission handling with #if BUILDFLAG(ENABLE_BRAVE_WALLET)
- Keeping wallet permission enum values unconditionally to maintain profile
  interchangeability between wallet-enabled and wallet-disabled builds
- Updating component registration and preference handling

Key changes:
- Permission enums remain stable across build configs for UMA and persistence
- Wallet permission handling code only compiled when wallet enabled
- DEPS files updated to allow buildflags includes

* Guard wallet UI code in front-end TypeScript and Mojom

Conditionally compiles wallet-related UI code in TypeScript and Mojom
interfaces based on enable_brave_wallet preprocessor flag.

Changes:
- Settings menu: Use lastInserted pattern for menu item ordering
- Page visibility: Guard wallet page visibility checks
- Browser commands: Guard wallet command handling
- Routes: Conditionally include wallet routes
- Add non-null assertions for DOM insertions in TypeScript
- Update Mojom interfaces to conditionally include wallet enums

Front-end code uses <if expr="enable_brave_wallet"> preprocessor
directives to exclude wallet UI when the feature is disabled.

* Guard wallet usage in non-wallet Brave code

Conditionally compiles wallet-related code in non-wallet Brave files
based on enable_brave_wallet build flag.

Changes include:
- browser/: Guard wallet service factories, preferences, and helpers
- components/: Guard wallet dependencies in rewards, sidebar, and DNS
- renderer/: Conditionally register wallet content settings
- utility/: Guard wallet component registration
- ios/: Add optional chaining for wallet feature flags
- test/: Guard wallet-related test code

Key files:
- brave_stats_updater.cc: Guard wallet pref registration with #if
- brave_profile_prefs.cc: Conditionally register wallet preferences
- sidebar_service.cc: Guard wallet panel items
- iOS WalletConstants.swift: Use optional chaining for feature checks

This allows building Brave without wallet while maintaining profile
compatibility between wallet-enabled and wallet-disabled builds.

* Add static_assert for ENABLE_BRAVE_WALLET in wallet headers

Adds compile-time assertions to wallet headers to ensure they are only
included when wallet is enabled. This prevents accidental usage of wallet
APIs when enable_brave_wallet=false.

Added static_assert(BUILDFLAG(ENABLE_BRAVE_WALLET)) to:

browser/brave_wallet/ (11 files):
- asset_ratio_service_factory.h
- brave_wallet_context_utils.h
- brave_wallet_ipfs_service_factory.h
- brave_wallet_provider_delegate_impl.h
- brave_wallet_service_factory.h
- brave_wallet_tab_helper.h
- meld_integration_service_factory.h
- wallet_notification_service_factory.h
- simulation_service_factory.h
- swap_service_factory.h
- wallet_data_files_installer_delegate_impl.h

components/brave_wallet/browser/ (15 files):
- brave_wallet_p3a_private.h
- brave_wallet_prefs.h
- brave_wallet_service.h
- brave_wallet_utils.h
- ens_resolver_task.h
- json_rpc_service_test_utils.h
- json_rpc_service.h
- keyring_service_observer_base.h
- keyring_service.h
- network_manager.h
- permission_utils.h
- pref_names.h
- test_utils.h
- tx_service.h
- wallet_data_files_installer.h

components/brave_wallet/common/ (6 files):
- brave_wallet_types.h
- common_utils.h
- eth_abi_utils.h
- features.h
- hex_utils.h
- pref_names.h

Also includes minor wallet code updates to use buildflags and
guard zcash-specific test code.

* Follow up fixes after Parts 1-7
2025-11-28 15:54:27 -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
Claudio DeSouza 3311878a1c [cr142] embedded_permission_request_descriptor deleted
This value is now deduced by engaging `embedded_permission_request_descriptor`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/85e1a085fd59c62f80eeb3dccf70073d95325dcb

commit 85e1a085fd59c62f80eeb3dccf70073d95325dcb
Author: Thomas Nguyen <tungnh@chromium.org>
Date:   Thu Sep 11 06:41:03 2025 -0700

    [PEPC] Support permission request from geolocation element

    This CL enhances the embedded permission request pipeline by providing
    more detailed information from the renderer to the browser. We also
    added a new structure to encapsulate data specific to requests
    originating from embedded elements, such as <geolocation>.

    This allows the permission model to gain more context and
    differentiate requests from permission, geolocation or future dedicated elements.

    Bug: 442362774, 442759380
    Change-Id: I4730b46fa3ea5416b53f16684ec531a45e4c4343
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6909529
    Commit-Queue: Ravjit Uppal <ravjit@chromium.org>
    Reviewed-by: Ravjit Uppal <ravjit@chromium.org>
    Reviewed-by: Joey Arhar <jarhar@chromium.org>
    Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1514238}
2025-10-15 18:32:06 -04:00
Claudio DeSouza 9e111593fc [cr142] Reanchoring PermissionController overrides
A few functions are now renamed for this type, and some of them now
return `content::PermissionResult`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/342191c07aadd1a8fb9833414c4c9a53ac810bea

commit 342191c07aadd1a8fb9833414c4c9a53ac810bea
Author: Florian Jacky <fjacky@google.com>
Date:   Wed Sep 10 07:32:47 2025 -0700

    [PermissionOptions] Multi-state permission subscriptions & setting changes

    With permissions with options, a subscription will no longer be uniquely defined by a permission type, since a permission option change may or may not impact a status change description (as the status depends on the request). Additionally, permission implementations may need to be notified about permission setting changes that do not affect the permission status. This CL refactors the infrastructure to enable subscribing to PermissionResult changes instead of simply permission status changes. PermissionResults contain the PermissionStatus, a PermissionStatusSource, and an optional PermissionSetting, hence this refactoring not only enables permission implementations to handle PermissionSetting changes that may not be part of the web-facing API, but also avoids them having to query the PermissionSetting after a change notification.

    Change-Id: I4e048730417d58e046da0ed2bb920268db155518
    Bug: 408965890
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6899206
    Reviewed-by: Nate Fischer <ntfschr@chromium.org>
    Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Reviewed-by: Christian Dullweber <dullweber@chromium.org>
    Reviewed-by: Elias Klim <elklm@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Reviewed-by: Shawn Quereshi <shawnq@google.com>
    Reviewed-by: Camille Lamy <clamy@chromium.org>
    Reviewed-by: Zijie He <zijiehe@google.com>
    Cr-Commit-Position: refs/heads/main@{#1513690}
2025-10-15 18:31:59 -04:00
Claudio DeSouza 5a211922ff [cr141] PermissionResult used in several places
This new type has a field for the `status` value. This change plubms
this type to several places where it is supposed to be used.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/16f277ba00702c1ce679ccf94291ce51f1a7ab6a

commit 16f277ba00702c1ce679ccf94291ce51f1a7ab6a
Author: Florian Jacky <fjacky@google.com>
Date:   Thu Aug 14 12:03:23 2025 -0700

    [PermissionOptions] Return PermissionResult in callback for requests

    This CL changes the callback type for permission requests to take a PermissionResult instead of a PermissionStatus. PermissionResults contain the PermissionStatus and can optionally contain the stored PermissionSetting, which is something that will need to be accessed by permissions with options, if they want to support permission downgrades (e.g. to detect that only coarse location was granted for a precise location request).

    To create a PermissionResult we use the PermissionStatus and set the PermissionStatusSource to UNSPECIFIED. Since the retrieved_permission_data member is an optional, we don't need to set it across the codebase. By default the permission context sets this member when permissions are set, which executes the permission request callback with this information (see PermissionContextBase::NotifyPermissionSet).

    Bug: 436773343
    Change-Id: Iaf4dfa2f1532db17a069eb6db032350f2a0d2019
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6818254
    Reviewed-by: Peter Conn <peconn@chromium.org>
    Reviewed-by: Ravjit Uppal <ravjit@chromium.org>
    Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Reviewed-by: David Dorwin <ddorwin@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1501523}
2025-09-22 14:59:43 -04:00
Claudio DeSouza 99246a2b01 [cr140] PermissionRequestData ctor taking a resolver
This change corrects the instantiations for `PermissionRequestData`, as
the construtor was changed to take a `ContentSettingPermissionResolver`
instance.

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

commit a476b87b8b227a36b54ffc98cd4e96385cb6ad10
Author: Florian Jacky <fjacky@google.com>
Date:   Fri Jul 11 05:44:25 2025 -0700

    [PermissionOptions] Refactor RequestIndependentPermissionResolver away

    Bug: 394543957, 393053278
    Change-Id: I3f51498167692b56014396861353cd72cb352aef
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6722451
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
    Reviewed-by: Christian Dullweber <dullweber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1485515}
2025-08-19 19:54:22 +01:00
Jakub Wądołowski be8e54c8bb chore: Update support domain name (#29625)
* chore: Update support domain name

* fix: Resolve formatting issue reported by CI

* chore: Conflict resolution

* fix: Update support.brave.com ref
2025-08-11 22:09:03 +01:00
cdesouza-chromium 468ce215b7 [CodeHealth] IWYU for absl::StrFormat (#30441)
This PR runs a mechanical change to do IWYU on all files using the new
abseil functions, while also removing the old header inclusions for
`base::StringPrintf`.

A presubmit `BanRule` is also being added for the `base::` functions.

Resolves https://github.com/brave/brave-browser/issues/48143
2025-08-05 18:20:12 +01:00
cdesouza-chromium 5eb666f034 [CodeHealth] Run gn format on all files (#30448)
This PR is the run of `gn format` on all `gn` files. This is a
mechanical change done with:

```sh
git ls-files -- "*.gn" | xargs gn format
git ls-files -- "*.gni" | xargs gn format
```

This change has been motivated primarily by an improvement to the
formatters privided by `gn` correcting cases of redundant target naming,
i.e cases where `//foo:foo` is used, and should just be `//foo`.

For this particular `gn` change, see:
https://chromium.googlesource.com/chromium/src/+/c822490a82cdb6ad479159683a92858f7c6f0a58

Resolves https://github.com/brave/brave-browser/issues/48161
2025-08-05 18:08:10 +01:00
cdesouza-chromium c100289833 [CodeHealth] Remove uses of base::StringPrintf pt.4 (#30395)
This PR has additional replacements for base::StringPrintf with the
underlying abseil implementation absl::StrFormat.

This is mostly a mechanical change.

Resolves https://github.com/brave/brave-browser/issues/48076
2025-08-01 12:06:49 +01:00
Claudio DeSouza cbeffe5e74 [cr139] PermissionDecision replaces is_one_time args
`PermissionDecision::kAllowThisTime` is the equivalent of what was being
provided through this argument.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/2cb5adab5b8a566cb47ab8f0c35621134a98695e

commit 2cb5adab5b8a566cb47ab8f0c35621134a98695e
Author: Florian Jacky <fjacky@google.com>
Date:   Wed Jun 18 13:21:50 2025 -0700

    [PermissionOptions] Turn one time grants into a PermissionDecision

    Bug: 411025625
    Change-Id: I84231344779e3be770dd9b97020159b7a47952d2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6632615
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1475822}
2025-07-16 13:38:45 -04:00
Claudio DeSouza 2f9126d418 [cr139][WIP] Use PermissionDecision around PermissionDecided
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d02023df812170e1e2c00f5a95006fcc40ec1e55

commit d02023df812170e1e2c00f5a95006fcc40ec1e55
Author: Florian Jacky <fjacky@google.com>
Date:   Wed Jun 18 13:21:31 2025 -0700

    [PermissionOptions] Introduce PermissionDecision

    This change removes technical debt by introducing PermissionDecision. This is crucial because ContentSettings are not semantically equivalent to permission decisions and include states that are not valid decisions. This CL refactors the permission infrastructure to use this enum for prompt decisions, moving away from ContentSettings. As an additional cleanup, the BrowserPermissionCallback has been updated to accept a PermissionStatus instead of a ContentSetting.

    Bug: 411025625
    Change-Id: I16bfa01a5608aaac6824dc4b6ce235d814dc2512
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6624075
    Auto-Submit: Florian Jacky <fjacky@chromium.org>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Commit-Queue: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1475821}
2025-07-16 13:38:45 -04:00
Claudio DeSouza abb1f912ff [cr139] Adding PermissionContextBase overrides
`ContentSettingPermissionContextBase` has been broken in two classes
with `PermissionContextBase` serving as the base class.

This change moves some of the existing override to
`PermissionContextBase`, to allow the brave version to have the same
customisation points as before.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/61cf70f0843c9721888ad04c23431d203469bc4d

commit 61cf70f0843c9721888ad04c23431d203469bc4d
Author: Florian Jacky <fjacky@google.com>
Date:   Wed Jun 11 04:39:11 2025 -0700

    [PermissionOptions] Prepare PCB to support permissions with options

    - Support WebsiteSetting values (i.e. base::Value) in PermissionContextBase
    - Create subclass ContentSettingPermissionContextBase of PermissionContextSettingBase to support all existing content setting based permissions
    - Add permission_options value to permssion_request_data, which prompts can use to pass back prompt options
    - Extend PermissionResult with retrieved_permission_data

    Full DD: go/multi-state-permissions-dd

    Change-Id: I68d16bb1512cd057363f338941d74bd16c3fe430
    Bug: 411025625
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6568536
    Reviewed-by: Andy Paicu <andypaicu@chromium.org>
    Reviewed-by: David Roger <droger@chromium.org>
    Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1472321}
2025-07-16 13:38:34 -04:00
Claudio DeSouza d72b9ed364 [cr139] PermissionContextBase renamed
This class is now named `ContentSettingPermissionContextBase`. This
affects several of our overrides.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/9f8c396a492dffad7b93c7d8adfe0fbdaee0dc45

commit 9f8c396a492dffad7b93c7d8adfe0fbdaee0dc45
Author: Florian Jacky <fjacky@google.com>
Date:   Tue Jun 10 02:50:36 2025 -0700

    [PermissionOptions] Rename PermissionContextBase to ContentSettingPermissionContextBase

    Bug: 411025625
2025-07-16 13:38:31 -04:00
Terry Mancey c9dbac0d22 [CodeHealth] Remove uses of banned std::to_string (#29669)
This PR replaces the banned std::to_string with its //base counterparts.
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md#std_sto_i_l_ul_ll_ull_f_d_ld_to_string_banned
2025-06-23 10:38:09 -04:00
Anton Paymyshev acd1a82ad1 Fix implicit deps on components/content_settings (#29668) 2025-06-23 15:31:11 +07:00
Anton Paymyshev 18188bafcd Fix implicit deps on components/prefs (#29649) 2025-06-20 14:33:58 +07:00
Anton Paymyshev bcf34bb280 Fix implicit deps on components/sync_preferences (#29626) 2025-06-19 13:26:31 +07:00
Anton Paymyshev a9cbf75ae4 Fix implicit deps on components/grit (#29611) 2025-06-18 14:07:01 +07:00
Claudio DeSouza 5e2f5064f1 [cr138] PermissionRequest stored with unique_ptr
Upstream has done changes around the use of vector of these values to
rely on `unique_ptr`. This affects several places in our code base,
including patching, and overriding.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/11f9810792ad5bad447d9d3aeae3c57a146b6bba

commit 11f9810792ad5bad447d9d3aeae3c57a146b6bba
Author: Florian Jacky <fjacky@google.com>
Date:   Tue May 20 08:57:18 2025 -0700

    [PermissionOptions] Improve PermissionRequest lifecycle management

    - Require all permission requests to be be passed as unique_ptrs, and let PermissionRequestManager take ownership of the request object lifetime
    - Remove delete-only cleanup callbacks, and stop relying on cleanup callbacks for object lifetime management.
    - Get rid of std::vector<raw_ptr<permissions::PermissionRequest, VectorExperimental>> in PermissionRequestManager
    - Use weak ptrs where we can't use unique ptrs (e.g. bookkeeping in the PermissionRequestManager or on Clank)

    DD: https://docs.google.com/document/d/1eayA06lALdfwa3vnYLph-tOEoRvcrtvUjqoTxl03QlA/edit?tab=t.0#bookmark=id.oygla6y7rc8q

    Change-Id: I23e5d708e3501e63eec80c58c6f59781a69dbfe5
    Bug: 394545912, 393053278
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6523566
    Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Reviewed-by: Theresa Sullivan <twellington@chromium.org>
    Reviewed-by: Andy Paicu <andypaicu@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1462828}
2025-06-11 17:07:36 -04:00
Claudio DeSouza 3ec7276dd5 [cr138] PermissionRequestData passed as ref
A recent change in Chromium is avoiding passing `PermissionRequestData`
as a unique_ptr around, and actually just as a ref where no mutate is
required.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/173060c862de19ba0660a29697a1614782cd8c43

commit 173060c862de19ba0660a29697a1614782cd8c43
Author: Chris Fredrickson <cfredric@chromium.org>
Date:   Wed May 14 07:23:01 2025 -0700

    Avoid references to unique_ptrs in permissions API

    A function that takes a reference does not typically care whether or not
    the referent is allocated on the heap. So, the use of `const
    std::unique_ptr<T>&` in the public API is unnecessary and overly
    restrictive. (E.g., GeolocationPermissionContextDelegateAndroid can now
    avoid an unnecessary heap allocation.)

    Additionally, the const keyword only promises that the unique_ptr itself
    is const; the referent might still be mutated. This is usually not the
    desired behavior when using references, so this type is somewhat
    misleading. (`const std::unique_ptr<const T>` would have to be used
    instead, in order to get familiar "immutable argument" semantics.)

    For both of those reasons, it is better to use a normal `const
    PermissionRequestData&` instead of `const
    std::unique_ptr<PermissionRequestData>&` in the public API.

    Change-Id: Iae1228a7bf17f9de77a86e2e9c44592e6a418645
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6532217
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Reviewed-by: Florian Jacky <fjacky@chromium.org>
    Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
    Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
    Reviewed-by: Colin Blundell <blundell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1460064}
2025-06-11 17:07:18 -04:00
Emerick Rogul 56f7ee1dc0 [cr138] Incorporate changes to PermissionRequest/PermissionRequestData
PermissionRequestData is now used to pass various permission parameters around
and several functions/constructors were modified to accomodate that change.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7f3e3ca1b6ceddc2e18a4fe86d2ce3ac936e68ba

commit 7f3e3ca1b6ceddc2e18a4fe86d2ce3ac936e68ba
Author: Florian Jacky <fjacky@google.com>
Date:   Mon May 5 09:19:20 2025 -0700

    [PermissionOptions] Simplify request path, provide resolvers, pass back request information

    This CL is part of a larger change to support permissions with options. A summary of changes in this CL can be found below, the full de>

    - Simplify interfaces to rely on PermissionRequestData wrapper and refactor PermissionContextBase and its subclasses accordingly.

    - Update PermissionRequestData to rely on permission resolvers.

    - Refactor PermissionRequest to rely on unique PermissionRequestData object and pass it to permission decided callbacks. Let Permission>

    Full design doc: http://go/multi-state-permissions-dd

    Change-Id: I81df3cbcedb9c7ef2340a0d79734adf77f336aae
    Bug: 394547183, 393053278
2025-06-11 18:56:27 +01:00
cdesouza-chromium c624801fa5 [IWYU] Fixing logging inclusions pt.5 (#29504)
This change is one of many fixing inclusion for the following files:

 - `base/notimplemented.h`
 - `base/notreached.h`
 - `base/check.h`
 - `base/dcheck_is_on.h`
 - `base/check_deref.h`
 - `base/check_op.h`
 - `base/logging/log_severity.h`
 - `base/logging.h`

This change is a mechanical change done with the following script:
https://github.com/brave/brave-browser/issues/46707#issuecomment-2960116515

Resolves https://github.com/brave/brave-browser/issues/46707
2025-06-11 12:49:04 +01: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
cypt4 df5bd689d4 [Cardano] Add Cardano site permission (#29101)
* [Cardano] Add Cardano site permission
Resolves https://github.com/brave/brave-browser/issues/46124
2025-05-28 13:28:32 +07:00
AlexeyBarabash 5cd09dbdc0 [cr137] Fixed Nullaway warnings 2025-05-13 15:53:21 -04:00
Artem Samoilenko 58e6734aca [cr137] [Android] Fixes for NullAway presubmit errors
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8bafbc5401239117b080d98f49e7bab83eed0e38

Turn NullAway presubmit upload check into an error instead of warning

Bug: 412696018
2025-05-13 15:53:18 -04:00
Claudio DeSouza 66eb524138 [cr137] Fix unwanted substitution in PermissionPrompt
This is a case where a header uses `PermissionRequest` as a forward
declaration, and therefore it cannot be inside the substitution for the
chromium implementation.

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

commit b62b90cc5d1b7184b6220c497028a639f0b2fbfa
Author: Piotr Bialecki <bialpio@chromium.org>
Date:   Fri Apr 18 05:39:58 2025 -0700

    Media preview: introduce additional product-specific data in HaTS

    This CL introduces additional product-specific data for camera and
    microphone permissions HaTS.

    Main changes:
    - PermissionRequest can now store preview parameters for HaTS.
    - UI-related code now will contain weak pointer to PermissionRequest,
      which it can then use to store preview parameters. Those parameters
      are used in ChromePermissionsClient to populate extra PSD for HaTS.
    - Metrics context used in previews UI code now stores information
      about whether permissions prompt was combined or not.
    - We now compute additional information in AudioStreamCoordinator,
      analogous to what VideoPreviewCoordinator does.

    Minor changes:
    - Untangled some includes and forward references in permissions-related
      code so that permissions_request.h could start including the
      permission_hats_trigger_helper.h.

    Change-Id: I5f7155e2fbd1d11b1bdf7fb3f133e2f9193111c4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6404635
    Reviewed-by: Ahmed Moussa <ahmedmoussa@google.com>
    Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
    Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1448830}
2025-05-13 15:53:12 -04:00
Claudio DeSouza f0a39e6ace [cr137] More cases of PermissionDescriptorPtr
This time around the use of `PermissionControllerDelegate`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/8373f041635205aa34164129a389941c774feccb

commit 8373f041635205aa34164129a389941c774feccb
Author: Florian Jacky <fjacky@google.com>
Date:   Wed Apr 16 07:20:53 2025 -0700

    Reland "[PermissionOptions] Use PermissionDescriptorPtr in PermissionControllerDelegate"

    This reverts commit d0da8f7e4b866502cb48f9b79868f976be33c042.

    Reason for revert: Fix CastPermissionManager

    Bug: 394547183, 393053278
    Original change's description:
    > Revert "[PermissionOptions] Use PermissionDescriptorPtr in PermissionControllerDelegate"
    >
    > This reverts commit e116ae4b94a5c9344be3c6ef021ed3e22355811f.
    >
    > Reason for revert: cause build failed: https://ci.chromium.org/ui/p/chromium/builders/ci/android-cast-arm64-dbg/6828/overview
    >
    > Bug: 394547183, 393053278
    > Original change's description:
    > > [PermissionOptions] Use PermissionDescriptorPtr in PermissionControllerDelegate
    > >
    > > This is part of a larger change to support permission options. Permissions with options can no longer be represented by a simple PermissionType enum value, hence the permission infrastructure will start relying on PermissionDescriptorPtrs instead of PermissionTypes.
    > >
    > > To reduce the complexity of this CL, it limits the scope of the interface changes to PermissionControllerDelegate,  its children and their usages, and uses utility mapping functions to map from PermissionType to PermissionRequestDescriptionPtr, i.e. it does not yet modify the infrastructure itself yet to fully rely on PermissionRequestDescriptorPtr.
    > >
    > > Since all ContentSetting permission types currently map to exactly one PermissionDescriptorPtr and vice versa, the mapping for all content setting permission types is unique and can rely on these mapping utility functions. Permissions that want to make use of permission options in the future, will create the correct PermissionRequestDescriptorPtr instead of relying on the current mapping functions.
    > >
    > > Design doc: go/multi-state-permissions-dd
    > >
    > > Bug: 394547183, 393053278
    > > Change-Id: I620e936a8dd433bfb23e822414126aed94e1995b
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6438921
    > > Reviewed-by: David Song <wintermelons@google.com>
    > > Commit-Queue: Florian Jacky <fjacky@chromium.org>
    > > Reviewed-by: Colin Blundell <blundell@chromium.org>
    > > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    > > Reviewed-by: Nate Fischer <ntfschr@chromium.org>
    > > Cr-Commit-Position: refs/heads/main@{#1446687}
    >
    > Bug: 394547183, 393053278
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Change-Id: I8bea71bb2ac283c37ea8154e3155c2bb8cf3738f
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6454573
    > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Owners-Override: Victor Tan <victortan@chromium.org>
    > Commit-Queue: Victor Tan <victortan@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1446703}

    Bug: 394547183, 393053278
    Change-Id: I52ea81711a8f4125b3d4c2ae531030518cac5472
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6455975
    Reviewed-by: Peter Beverloo <peter@chromium.org>
    Reviewed-by: David Song <wintermelons@google.com>
    Reviewed-by: Antonio Rivera <antoniori@google.com>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    Reviewed-by: Nate Fischer <ntfschr@chromium.org>
    Reviewed-by: Victor Tan <victortan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1447707}
2025-05-13 15:53:07 -04:00
Artem Samoilenko 72b16cd130 [cr137] [Android] Refactor classes for improved TextViewWithClickableSpans
Chromium change:
https://chromium.googlesource.com/chromium/src/+/48018d01bf6f0ac186684a9fa73b6a98704ad9c9

Refactor classes for improved TextViewWithClickableSpans

The changes in this CL are preparation for updates in
https://chromium-review.googlesource.com/c/chromium/src/+/6383822.

Bug: 405441323
2025-05-13 15:53:00 -04:00
Claudio DeSouza 961a9a8d77 [cr137] Add Brave types to blink::mojom::PermissionName
This new enum type has no entries for the brave permission types. This
change adds the equivalent matching to satisfy the switch statements for
them.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/65b7d1024662d56b3ad7bf59580c2f9aa04d090e

commit 65b7d1024662d56b3ad7bf59580c2f9aa04d090e
Author: Florian Jacky <fjacky@google.com>
Date:   Mon Apr 7 03:02:52 2025 -0700

    [PermissionOptions] Generalize PermissionRequestDescription

    Refactor PermissionRequestDescription to hold PermissionDescriptorPtr.
    Permissions with options can no longer be represented by a simple
    PermissionType enum value, hence future infrastructure refactorings to
    enable them will pass around PermissionDescriptorPtrs instead of mapping
    PermissionDescriptorPts to PermissionTypes.

    To reduce the complexity of this CL, it limits the scope of the
    refactoring to PermissionRequestDescription, its creations and usages
    and uses utility mapping functions to map
    PermissionRequestDescriptionPtr usages of this object to the
    PermissionTypes. I.e. it does not yet modify the infrastructure itself
    yet to rely on PermissionRequestDescriptorPtr.

    Since all ContentSetting permission types currently map to exactly one
    PermissionDescriptorPtr and vice versa, the mapping for all content
    setting permission types is unique and can rely on these mapping utility
    functions. Permissions that want to make use of permission options in
    the future, will create the correct PermissionRequestDescriptorPtr
    instead of relying on the current mapping functions.

    refactoring. We need to add mapping functions to reduce the scope of
    this CL and avoid having to make all changes at once. These mapping
    functions will not be necessary in fuchsia, as the infrastructure will
    move to fully relying on a different type.

    Bug: 405943540, 393053278
    Fuchsia-Binary-Size: Increase is temporary. This CL is part of a large
    Change-Id: I9d6e3e71385749787a973a61e41ce130665c860d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6387077
    Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    Reviewed-by: Nate Fischer <ntfschr@chromium.org>
    Commit-Queue: Florian Jacky <fjacky@chromium.org>
    Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1443356}
2025-05-13 15:52:49 -04:00
Darnell Andries 52db129b78 Merge pull request #28927 from brave/permission-lifetime-p3a
Add metrics for permission lifetimes
2025-05-05 12:58:55 -07:00
Darnell Andries d5313c77fa Add metrics for permission lifetimes 2025-05-02 15:53:50 -07:00
Brian Johnson c75d1de3d3 [CodeHealth] remove brave_l10n::GetLocalizedResourceUTF16String (#28889)
remove brave_l10n::GetLocalizedResourceUTF16String and replace with ui/base/l10n
2025-05-01 04:22:24 -07:00
cdesouza-chromium 797ff8d307 [unsafe-buffers] Remove all #pragma allow_unsafe_buffers (#28637)
This change migrates all uses of `#pragma allow_unsafe_buffers` to use
`UNSAFE_TODO`. This makes the offending places more visible, as well as
making explicit the introduction of new spots.

Resolves https://github.com/brave/brave-browser/issues/45414
2025-04-14 22:26:35 +01:00
Claudio DeSouza c16df874ba [cr135] Removing unused permission policy mojom header
The header itself is deleted and the implementation has moved elsewhere
making the inclusion unnecessary.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/878f8351809ff802cae6173daaaac6f7bc05e2cd

commit 878f8351809ff802cae6173daaaac6f7bc05e2cd
Author: Sandor Major <sandormajor@chromium.org>
Date:   Tue Feb 18 12:16:02 2025 -0800

    Move `ParsedPermissionsPolicyDeclaration` from Blink to Network service

    The network service is going to need access to the "storage-access"
    Permissions Policy. This is the third step of moving some of the
    Permissions Policy logic out of Blink to maintain a single
    implementation of https://w3c.github.io/webappsec-permissions-policy
    across Chromium.

    Bug: 382291442
2025-03-18 20:02:10 -04:00
Claudio DeSouza 1dce2a257a [cr134] PermissionsPolicyFeature moved to network::
`PermissionsPolicyFeature` is now under `services/network//`. This
affects also the extension for the `.mojom` file for it.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/1b851527a0b64d38bce7c827c90085705d2e88df

commit 1b851527a0b64d38bce7c827c90085705d2e88df
Author: Sandor Major <sandormajor@chromium.org>
Date:   Fri Jan 31 07:48:32 2025 -0800

    Move `PermissionsPolicyFeature` from Blink to the Network service

    The network service is going to need access to the "storage-access"
    Permissions Policy. This is the first step of moving some of the
    Permissions Policy logic out of Blink to maintain a single
    implementation of https://w3c.github.io/webappsec-permissions-policy
    across Chromium.

    Tha main change here is moving the `PermissionsPolicyFeature` type from
    `blink.mojom` to `network.mojom`:
    https://crrev.com/c/6180431/7/services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom

    Bug: 382291442
2025-02-18 12:46:59 +00:00
Artem Samoilenko 363c16ea08 [Android] Rename NoUnderlineClickableSpan -> ChromeClickableSpan
Chromium change:
https://chromium.googlesource.com/chromium/src/+/eda1322af61acc3f5cb40191fe897dc93d4b5095

Add underline to links

Based on the a11y team’s request, added underline to links across the product per GAR requirements.
Renamed NoUnderlineClickableSpan to ChromeClickableSpan and removed #setUnderlineText(false).
Updated ~70 render tests that were failing due to this fix.

The following are some of the before & after screenshots:

1. Delete browsing data
Before: https://screenshot.googleplex.com/69tSeP6YBGr95VU
After: https://screenshot.googleplex.com/7WujhWgczf2WmAj

2. Include surrounding text in Google searches
Before: https://screenshot.googleplex.com/9g8VhvttwhTJ79G
After: https://screenshot.googleplex.com/9jPxBG265WErHVk

3. Sad tab
Before: https://screenshot.googleplex.com/4qv7jVva8m9wnP3
After: https://screenshot.googleplex.com/5PwokFga4cw84KN

4. Autofill services
Before: https://screenshot.googleplex.com/Anvz2MZkC3dVEsP
After: https://screenshot.googleplex.com/8arauGBc6JrJQB5

5. Sign-in footer
Before: https://screenshot.googleplex.com/3dQ9kbgWpTvgGX8
After: https://screenshot.googleplex.com/6KBiPUxXyhdxvQc

6. Delete browsing data basic
Before: https://screenshot.googleplex.com/7Xf2kjSVBnjtb2C
After: https://screenshot.googleplex.com/7ZPRWZ7ofpnjEYn

7. Price tracking notifications
Before: https://screenshot.googleplex.com/8yNPhgd4yyjPuiH
After: https://screenshot.googleplex.com/BmhMTVaGjkK427n

8. Safe Browsing
Before: https://screenshot.googleplex.com/6Vtbvea44YQpkyF
After: https://screenshot.googleplex.com/8eHVcHbcjtoYb9H

Bug: 344043844
2025-01-27 09:41:09 -05:00
Claudio DeSouza 848d5e7c65 [cr132] ContentSettingsType functions names changed
These are pure non-functional renamings that are mostly immaterial.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/bbca3f0d400a895412f3ff8eda7dcad79e04b6a1

commit bbca3f0d400a895412f3ff8eda7dcad79e04b6a1
Author: Chase Phillips <cmp@chromium.org>
Date:   Tue Oct 22 14:12:17 2024 +0000

    permissions: Fix name for ContentSettingsType

    ContentSettingsType was referred to in some places with a typo. Fix
    the name to bring consistency, which should improve readability and
    using other tools like grep.

    Bug: 374797724
2024-11-29 13:24:50 +00:00
Anton Paymyshev ec35af9ac3 Fix UNSAFE_TODO for wallet [part 1 of N] (#26431)
* Fix UNSAFE_TODO for wallet

* fix review

* fix review
2024-11-14 14:55:11 +00:00