Commit Graph
100 Commits
Author SHA1 Message Date
cdesouza-chromium b42d7c0cdc [brockit] Adding a section about classes to dos and donts (#36671)
This section about classes is being added to emphasise the important of
making sure we have good access control to data fields.
2026-05-24 00:46:42 +01:00
cdesouza-chromium c179217e06 [cherry-pick] Restrict background fetch from Service Worker context (#36655)
This fix is a cherry-pick of https://crrev.com/c/7867618.

Resolves https://github.com/brave/brave-browser/issues/55755
2026-05-23 00:39:48 +01:00
cdesouza-chromium 733bc178bb [toolchain] Accept Xcode license regardless of toolchain download (#36667)
This PR corrects corrects a problem where our
`download_hermetic_xcode.py` script was diverging from the upstream one
by early returning whenever it confirmed that the toolchain had already
been downloaded and not trying to accept the license. This has been
causing issues in CI, where nodes being used for different branches,
with different SDKs, are not properly going over the necessary plist
updates that they should have done.

This PR corrects this aspect of the behaviour, but it also makes this
particular script more alinged with the upstream script itself.
2026-05-23 00:31:15 +01:00
Claudio DeSouza 486ffb9112 [cr149] kPdfSaveToDrive disabled by default
This feature has been broken in brave, and because of that it was
disabled before with a build flag. In M149 that build flag doesn't
produce a coherent build anymore, so we fall back to overriding the
feature flag.

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

commit dd6626cdd58e0ccd306599507de9a47e5a2573e9
Author: April Kallmeyer <ask@chromium.org>
Date:   Fri Apr 24 15:25:16 2026 -0700

    [PDF Ink Signatures] Call the new pdfViewerPrivate.getTextInfo() API

    Pass the results of getTextInfo() to the backend on text annotation
    commit and cache which fonts were already loaded.

    Ink2Manager keeps track of the IDs previously sent and will not
    repeatedly send the same font data to the backend to load, and it will
    tell the getTextInfo() private API not to serialize the known fonts. The
    backend is expected to save and reuse the font data from the frontend.

    Bug: 408976049
    Co-Authored-By: Lei Zhang <thestig@chromium.org>
    Change-Id: Ifcfd99dcae3d05f5ce5d49f81130ccb9f0cdb731
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7728778
    Commit-Queue: April Kallmeyer <ask@chromium.org>
    Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
    Reviewed-by: Lei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1620509}
2026-05-22 16:57:43 -04:00
Claudio DeSouza 4ea2cec784 Updated strings for Chromium 149.0.7827.14. 2026-05-22 16:57:43 -04:00
Claudio DeSouza e93939d1dd Update patches from Chromium 148.0.7778.179 to Chromium 149.0.7827.14. 2026-05-22 16:57:42 -04:00
Claudio DeSouza ed61653f89 [cr149] Page Actions sources moved around
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/4f093f4239eb2814f57bc97ee593d7acd717ac42

commit 4f093f4239eb2814f57bc97ee593d7acd717ac42
Author: Kaan Alsan <alsan@chromium.org>
Date:   Thu Apr 30 13:03:09 2026 -0700

    Relocate Page Actions core logic to chrome/browser/ui/page_actions

    Bypass-Check-License: Moving files
    Change-Id: I4af05df48a60854e20119bd40f2df4b3870cd86c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7801005
    Reviewed-by: Eshwar Stalin <estalin@chromium.org>
    Commit-Queue: Kaan Alsan <alsan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1623365}
2026-05-22 16:57:40 -04:00
Claudio DeSouza 4d3098bad7 [cr149][rust] extra_build_script_src_roots dropped in gnrt
This is now just `extra_build_script_input_roots`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3197ca477e1f00cc6252cf79bb31c5bc87dc1a6d

commit 3197ca477e1f00cc6252cf79bb31c5bc87dc1a6d
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Mon May 4 11:37:30 2026 -0700

    [gnrt] Use `..._input_roots` for everything and remove `..._src_roots`.

    This change avoids the following problems:

    * Having to say `extra_input_roots = ['../data']` **and also**
      `extra_src_roots = ['../data']` in `gnrt_config.toml` entries for
      multiple ICU crates.  The repetition was introduced because
      `..._input_roots` ignores `.rs` files.  But in both cases the
      discovered files are exposed as GN `inputs` (not `sources`).
      This was reported a while ago by @manishearth in chat, but I forgot to
      open a bug and follow-up... :-(
    * General confusion about how things work, which was encountered when
      tweaking import of `zerocopy` for fuzzing.  This was reported recently
      and captured in https://crbug.com/508339800.

    Before this change `extra_input_roots` wouldn't cover `.rs` files, so
    the removal of `extra_src_roots` means that `extra_input_roots` has to
    also cover `.rs` files after this change.  This in turn means that we
    need to explicitly list files one-by-one in
    `build/rust/std/gnrt_config.toml` to avoid adding unnecessary `.rs`
    files to the generated `BUILD.gn`.  This is a bit unfortunate -
    hopefully this will be fixed by adopting `glob` or a similar globbing
    crate in a follow-up CL.

    Tested by manually running the following tools (and including the
    results in this CL):

    * `tools/crates/run_gnrt.py gen`
    * `tools/rust/gnrt_stdlib.py`
    * `cargo test` and `cargo clippy` in `tools/rust/gnrt`

    Bug: 508339800
    Change-Id: I4db48ca9f5f215a3b5daaa42e9fd4df9e2c122b0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7810294
    Reviewed-by: Devon Loehr <dloehr@google.com>
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1624842}
2026-05-22 16:57:38 -04:00
Claudio DeSouza 4920f6db14 [rust][cr149] extra_input_roots using wildcards
These changes have been automatically picked up on by `gnrt gen`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/36a5776a2fefd795a20d7f95a5f0eb64dd9ff75b

commit 36a5776a2fefd795a20d7f95a5f0eb64dd9ff75b
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Mon May 4 15:09:18 2026 -0700

    [gnrt] Allow wildcards and any file extension in `extra_input_roots`.

    Rather than allowlisting extensions one-by-one, let's add support for
    wildcards and let `gnrt_config.toml` pick which extensions to cover.

    Other changes in this CL:

    * It turned out that before this CL `extra_input_roots` was ignored for
      "binary" crates (and only taken into account for "library" crates)
    * Stop automatically enumerating non-`.rs` files under `src/`.  This
      was somewhat okay when only allowlisted extensions were included, but
      would result in lots of extra files after this CL.  (And also, this
      removes some unneeded `BUILD.gn` entries here and there.)
    * Globbing means that we no longer need to manually match extensions
      in `fn collect_crate_file` so this function has been inlined
      and refactored away.

    Tested by manually running the following tools (and including the
    results in this CL):

    * `tools/crates/run_gnrt.py gen`
    * `tools/rust/gnrt_stdlib.py`
    * `cargo test` and `cargo clippy` in `tools/rust/gnrt`

    Bug: 508339800
    Change-Id: Ieb6b0d7205b407f921272bf5ad7c7bc54f355f32
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7809525
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Reviewed-by: Devon Loehr <dloehr@google.com>
    Cr-Commit-Position: refs/heads/main@{#1624964}
2026-05-22 16:57:37 -04:00
Claudio DeSouza 349cb452f6 [cr149] Fix CheckRenderFrameType override to global_id
This change is functionally the same, as it merely changes how the
underlying values are read from the new argument.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ee42da3af8311556b84afb3dc2ff9bc0ca75b7b

commit 5ee42da3af8311556b84afb3dc2ff9bc0ca75b7b
Author: Chris Staite <christopher.staite@menlosecurity.com>
Date:   Fri May 1 01:49:25 2026 -0700

    Use GlobalRenderFrameHostId in speech recognition

    Update `SpeechRecognitionSessionContext` and associated manager
    delegates to use `content::GlobalRenderFrameHostId` instead of passing
    `render_process_id` and `render_frame_id` as separate integer values.
    This also applies to embedder frame IDs, which are now represented by
    `embedder_global_id`.

    This refactoring simplifies method signatures across the speech
    recognition API, including `SpeechRecognitionManagerImpl` and
    `OnDeviceSpeechRecognitionEngine`, reducing the risk of mismatched IDs
    and improving overall code clarity when identifying render frames.

    Bug: 379869738
    Change-Id: I0bbf3f026b98428b706f2777ce327030e675720d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7805227
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Commit-Queue: Christopher Staite <christopher.staite@menlosecurity.com>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Reviewed-by: Bo Liu <boliu@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1623755}
2026-05-22 16:57:33 -04:00
Claudio DeSouza ebd4150618 [cr149] Correcting ntp_pref_names.h due to Android NTP
This change corrects the inclusion of this header everywhere, but it
also fixes one of the patches that were broken recently due to this
change.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/42937e4ba2e5d383daf6f0e057f5fe530ac1a451

commit 42937e4ba2e5d383daf6f0e057f5fe530ac1a451
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Fri May 1 06:38:05 2026 -0700

    Initial prototype of WebUI NTP for Android

    It only barely works, but sets the groundwork so that we can iterate
    on the missing / broken functionality.

    All changes are guarded behind GN arg: enable_webui_ntp, and also
    behind a runtime flag: --use-webui-ntp.

    This does not remove the native NTP, but instead navigates to:
      chrome://new-tab-page/
    instead of:
      chrome-native://newtab/

    Bug: b:502297163
    Bypass-Check-License: Moved file
    Change-Id: If5e535793fa20f67d8897aee2d6bf55e95af2fce
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7773408
    Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Ken Buchanan <kenrb@chromium.org>
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1623798}
2026-05-22 16:57:33 -04:00
Claudio DeSouza 4e1567324e [cr149] toolbar_height_side_panel() now just side_panel()
This is an accessor renaming for `BrowserView` and
`BrowserViewLayoutViews`.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/49935f86367082b50b34fc7be3ead05a6a642e0c

commit 49935f86367082b50b34fc7be3ead05a6a642e0c
Author: Caroline Rising <corising@chromium.org>
Date:   Fri May 1 09:28:08 2026 -0700

    [Side panel] Rename uses of toolbar height side panel to be side panel

    Bug: 505776475
    Change-Id: I57b648e79dff947ec18eeb4a3621affb10b3b089
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7807791
    Reviewed-by: Eshwar Stalin <estalin@chromium.org>
    Commit-Queue: Caroline Rising <corising@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1623866}
2026-05-22 16:57:32 -04:00
Claudio DeSouza b9b1ce9657 [cr149] browser_navigator now in its own directory
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/815c5cff075fb58c5ec93d967479af57312a5894

commit 815c5cff075fb58c5ec93d967479af57312a5894
Author: Foromo Daniel Soromou <koretadaniel@chromium.org>
Date:   Thu Apr 30 18:38:51 2026 -0700

    Move browser_navigator files to a subdirectory

    Move the `browser_navigator*` files from `chrome/browser/ui/` to a new
    `chrome/browser/ui/navigator/` subdirectory to better organize the
    codebase. Update all corresponding include paths across the repository
    to reflect the new file locations.

    Bypass-Check-License: This is a file rename only.
    Bug: none
    Change-Id: I512c4119e212966e84001924ab2eb2e501a490d7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7801797
    Reviewed-by: Darryl James <dljames@chromium.org>
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Commit-Queue: Foromo Daniel Soromou <koretadaniel@chromium.org>
    Reviewed-by: Ashley Prasad <ashleydp@google.com>
    Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
    SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
    Cr-Commit-Position: refs/heads/main@{#1623653}
2026-05-22 16:57:32 -04:00
Claudio DeSouza 5fb940665f [cr149] Fix upstream changes to WindowFrameProvider/FakeLinuxUi
A few classes are being affected by these changes but they are mostly
incosequential overall.

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

commit e0f759f728337f7df2f808ebc2c1eefffab5c5e3
Author: Athul Iddya <athul@iddya.com>
Date:   Thu Apr 16 17:08:08 2026 -0700

    Add a native frame view for non-browser widgets on Linux

    Introduces NativeFrameViewLinux, a FrameViewLinux subclass that provides
    native client-side decorations for non-browser widgets on Linux. This
    class is preferred over FrameViewLinux for the GTK UI theme. Its
    implementation mirrors BrowserFrameViewLinuxNative, using
    WindowFrameProvider for frame decoration and NavButtonProvider for
    window control buttons.

    NativeFrameViewLayoutLinux similarly extends FrameViewLayoutLinux to
    override frame and button layout decisions using WindowFrameProvider and
    NavButtonProvider. Shared utilities between NativeFrameViewLinux and
    BrowserFrameViewLinuxNative are extracted into frame_view_utils_linux.

    WindowFrameProvider and NativeTheme gain options for non-browser frame
    rendering: top area height, padding and border APIs, and bottom border
    drawing in the top area, to match the appearance of native GTK dialogs.

    Bug: 396190939
    Cq-Include-Trybots: luci.chromium.try:linux-wayland-mutter-rel,linux-wayland-weston-rel
    Change-Id: Iee94d493a1751176c38d793e7efcfe47271bc909
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7615475
    Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
    Auto-Submit: Athul Iddya <athul@iddya.com>
    Reviewed-by: David Yeung <dayeung@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616203}
2026-05-22 16:57:32 -04:00
Claudio DeSouza bd450fd91c [cr149] Fixing BraveSpecificsToModel due to last field change
This field used to be a bool, but it is now an enum. This change
corrects the implementation of `BraveSpecificsToModel`, which is
supposed to stay in sycn with `DeviceInfo`.

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

commit 2beaaac13944769bdb69f50226ddb84e8e840456
Author: Theodore Olsauskas-Warren <sauski@google.com>
Date:   Thu Apr 30 10:56:48 2026 -0700

    [Glic] Move experimental triggering in DeviceInfo to use Enum

    Update the recently added bool glic_experimental_triggering_opted_in
    to use an enum, updating its name to match.

    The previously added proto entry is removed and the value reused,
    there is no practical risk of version mismatch (and bool values map to
    enum versions that are reasonably safe).

    Change-Id: I231dca339fa09a72d6b79d7a4aeb12d3e9b3b761
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7796299
    Reviewed-by: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: David Trainor <dtrainor@chromium.org>
    Reviewed-by: Maria Petrisor <mpetrisor@chromium.org>
    Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
    Reviewed-by: Roman Arora <romanarora@chromium.org>
    Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
    Reviewed-by: Min Qin <qinmin@chromium.org>
    Reviewed-by: Rohit Rao <rohitrao@chromium.org>
    Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1623334}
2026-05-22 16:57:32 -04:00
Claudio DeSouza c40fa41402 [cr149] //chrome/browser/ui/navigator componentised
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/a7ea861d95f70515cbddad5ea07b29ba144f5659

commit a7ea861d95f70515cbddad5ea07b29ba144f5659
Author: Foromo Daniel Soromou <koretadaniel@chromium.org>
Date:   Thu Apr 30 08:15:42 2026 -0700

    Extract browser navigator into a separate build target

    NOTE: This change is trivial and do not change any behavior.

    Extract the browser navigator code and its associated parameters from
    the monolithic `chrome/browser/ui` build target into a dedicated
    `chrome/browser/ui/navigator` directory and build configuration.

    This refactoring establishes a new standalone build file containing
    dedicated source sets for the navigator component. Consequently, the
    `browser_navigator_params_headers` source set and related source files
    are removed from `chrome/browser/ui/BUILD.gn`.

    Numerous build files across the `chrome/browser` directory are updated
    to replace the old dependency with the new
    `//chrome/browser/ui/navigator` target. This modularization decouples UI
    components, streamlines dependency management, and improves overall
    build structure.

    A follow up CL will move the files under c/b/ui/navigator and rename the
    include places.

    Bug: none
    Change-Id: I65c10afadfb1dc3857a3714cdbce6d06201633ab
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7803848
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Reviewed-by: Kaan Alsan <alsan@chromium.org>
    Commit-Queue: Foromo Daniel Soromou <koretadaniel@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1623210}
2026-05-22 16:57:31 -04:00
Claudio DeSouza 6280a4ab16 [WIP][cr149] SidePanel using toolbar side panel height
This change drops the use of `contents_height_side_panel_` in favour of
`toolbar_height_side_panel_`. It all changes our interface for
`SidePanel` to match the changes in upstream for how `SidePanelType` is
passed around.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/32daa3e6986fa59dc7adeca3104b17b0a0b63f63

commit 32daa3e6986fa59dc7adeca3104b17b0a0b63f63
Author: Caroline Rising <corising@chromium.org>
Date:   Wed Apr 29 11:37:34 2026 -0700

    [Side panel] Make all side panels use the toolbar height side panel view.

    This removes usage of the content height side panel view and makes the
    toolbar height side panel layout according to the current feature's
    SidePanelType. This also removes all no unnecessary uses of
    SidePanelType as a param for various side panel accessors.

    In a followup we will rename the toolbar height side panel.

    Bug: 505775465, 505776523
    Change-Id: I5fd80c00064621250619cf4b3c9df326f4bc2ea7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7789262
    Commit-Queue: Caroline Rising <corising@chromium.org>
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Reviewed-by: Eshwar Stalin <estalin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1622601}
2026-05-22 16:57:30 -04:00
Claudio DeSouza 8705bfefe7 [cr149][android] Fixing SearchIndexProviderRegistry plaster imports
This class is now importing a lot of the modules that were being
referred to, which broke the plaster. This change corrects that, and
corrects our own insertion of our types to also use similar imports.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/444fafd03c31e8301faba71cf6703fe522121f57

commit 444fafd03c31e8301faba71cf6703fe522121f57
Author: Sky Malice <skym@chromium.org>
Date:   Wed Apr 29 10:39:32 2026 -0700

    Remove qualified imports from SearchIndexProviderRegistry.java.

    Bug: 505789955
    Change-Id: I5a4640575e2f1897375ce99cdf8b9be4ca9f31ff
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7797509
    Reviewed-by: Moe Adel <adelm@google.com>
    Commit-Queue: Sky Malice <skym@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1622573}
2026-05-22 16:57:30 -04:00
Claudio DeSouza aee373dd92 [cr149] RandInt removed
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5f591f6b5e3cb8a1bd75a75a8cfb63ff4677af01

commit 5f591f6b5e3cb8a1bd75a75a8cfb63ff4677af01
Author: Elly <ellyjones@chromium.org>
Date:   Tue Apr 28 23:29:33 2026 -0700

    base: remove RandInt

    Removed all remaining calls to base::RandInt and deleted the
    function. The new blessed way to do this is base::RandIntInclusive.

    Fixed: 40283703
    Change-Id: I7b3a1737f11b7364e33d32df26caafac17981dd1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7798357
    Auto-Submit: Elly <ellyjones@chromium.org>
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1622254}
2026-05-22 16:57:28 -04:00
Claudio DeSouza e575881ba7 [plaster][cr149] Converting the GetWebStoreURL into a plaster
This change reduces the use of shadow files for this customisation. In
particular, the replacements required an extra function to be overriden
to correct the replacements in the body of the source.

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

commit d959d50e90e94ec50892c3244c70cbac15e93c55
Author: Anton Bershanskyi <bershanskyi@gmail.com>
Date:   Tue Apr 28 12:47:00 2026 -0700

    [Extensions] Move manifest_url_handlers.{h,cc}

    Rename extensions/common/manifest_url_handlers.{h,cc} to
    extensions/common/manifest_handlers/manifest_url_handlers.{h,cc}.
    This commit was generated automatically by the script tool
    tools/git/move_source_file.py.

    Bug: 324534603
    Bypass-Check-License: Files moved, not created.
    Change-Id: Ia8c401b4075b0737a38ccd6074177e404c2043f7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7747370
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Commit-Queue: Anton Bershanskyi <bershanskyi@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#1621973}
2026-05-22 16:57:28 -04:00
Claudio DeSouza 2224d9ad60 [ts][cr149][WIP] ESlint fixes for html imports in .html.ts template
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/520291761b7f51175efa7c1a7daeaeee13adbb91

commit 520291761b7f51175efa7c1a7daeaeee13adbb91
Author: rbpotter <rbpotter@chromium.org>
Date:   Tue Apr 28 11:01:46 2026 -0700

    WebUI: Add check for html imports in CrLitElement subclass def. files

    This ensures templates are properly placed in .html.ts template files
    for such classes, so that they will get proper template validation.

    Bug: 506193591
    Change-Id: Ie0d75b9c566ce22a33c90ae21bdb878fec6762b4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7794465
    Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
    Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1621907}
2026-05-22 16:57:27 -04:00
Claudio DeSouza 75ce6e9af1 [cr149] AffiliationServiceImpl::PrefetchChangePasswordURL renamed
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/a2bcd9cb8e7179613fbcf0d27595e3bc25eced78

commit a2bcd9cb8e7179613fbcf0d27595e3bc25eced78
Author: Viktor Semeniuk <vsemeniuk@google.com>
Date:   Mon Apr 27 11:21:27 2026 -0700

    Use change-pwd url received from afiliation service

    This CL updates change-pwd url fetching to avoid using stale change
    password urls from cache during automated password change.

    Fixed: 506122721
    Change-Id: I89c6e823dddcc25dcf1a489debf32f471b23a552
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7792821
    Reviewed-by: Ioana Treib <ioanap@chromium.org>
    Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
    Cr-Commit-Position: refs/heads/main@{#1621208}
2026-05-22 16:57:26 -04:00
Claudio DeSouza cd77ff9ee7 [cr149] FindBrowserWithWebContents renamed upstream.
Follow up to:

commit 72f140e852
Author: Claudio DeSouza <cdesouza@brave.com>
Date:   Wed Oct 11 17:42:49 2023 +0100

    `FindBrowserWithWebContents` renamed upstream

    This is a simple function rename with no other effects.

    Chromium change:
    https://chromium.googlesource.com/chromium/src/+/82d9bb0f98d7c88a1b2af2e267cf36125fba17c6

    commit 82d9bb0f98d7c88a1b2af2e267cf36125fba17c6
    Author: Avi Drissman <avi@chromium.org>
    Date:   Mon Oct 9 21:05:45 2023 +0000

        Rename FindBrowserWithWebContents to FindBrowserWithTab

        "WebContents" hasn't been synonymous with "tab" since the content
        split. It's confusing to have a function that says it finds a browser
        by "web contents" yet only looks at the tabs.

        Rename the function so that its name accurately reflects its function.

        Bug: none
2026-05-22 16:57:26 -04:00
Claudio DeSouza ec3fc55ca2 [cr149] glic_experimental_triggering_opted_in in DeviceInfo
This change reruns the plasters, and adds an update to the call for the
constructor of `DeviceInfo` to pass the newly added argument.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/390ff11a3d7dee78459be3ad5a0f7ca614700bd7

commit 390ff11a3d7dee78459be3ad5a0f7ca614700bd7
Author: Theodore Olsauskas-Warren <sauski@google.com>
Date:   Fri Apr 24 12:04:14 2026 -0700

    [GLIC] Include experimental_triggering opt-in state in DeviceInfo

    A new function which represents the combination of GLIC FRE +
    Actuation + Experimental actuation is added to GlicEnabling, and
    the value is included in the DeviceInfo FeatureSpecificFields.

    Many test call sites which construct a DeviceInfo object are updated,
    and given we are updating these sites anyway, the singular default
    value for MobilePromoOnDesktopPromoTypeSet in the DeviceInfo
    constructor is removed and call sites updated.

    Bug: b:505510293
    Change-Id: I3943e1eddf83ae6d431cc62b8446876c1bd35105
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7783606
    Reviewed-by: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: James Cook <jamescook@chromium.org>
    Reviewed-by: Rohit Rao <rohitrao@chromium.org>
    Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
    Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1620378}
2026-05-22 16:57:24 -04:00
Claudio DeSouza 35427a9a75 [cr149] Fixing std::vector iterator base() breakage
This breakage seems to be the result of a libc++ update.
2026-05-22 16:57:23 -04:00
Claudio DeSouza d3be5ab9f1 [cr149] Using SetHighlightedElement
This change migrates from `SetHighlightedButton` to
`SetHighlightedElement`, which expects an element id.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/b382a3d424be203195b983b3d37b258786c839f8
https://chromium.googlesource.com/chromium/src/+/5c61647fa6331ad61b0173fb2780e3ce732445dd

commit b382a3d424be203195b983b3d37b258786c839f8
Author: Maks Orlovich <morlovich@chromium.org>
Date:   Fri Apr 24 11:59:39 2026 -0700

    Finish SetHighlightedButton->Element migration.

    The final user (the CrOS input overlay for games) was working around a
    bug in SetAnchorView not updating the highlight unless it also changed
    the widget (or was being set for the first time). So testcase + fix that
    bug, and remove the now unneeded call.

    With that done, the now unused SetHighlightedButton and corresponding
    code are also removed, as is some of the necessary state. The ability to
    highlight views::Buttons is still around, however, since they may be the
    anchor.

    Bug: 489349570
    Change-Id: I48f49ce05f07379db8dbf3b6614b85a66a2b165a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7789255
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Commit-Queue: Maks Orlovich <morlovich@chromium.org>
    Reviewed-by: Cici Ruan <cuicuiruan@google.com>
    Cr-Commit-Position: refs/heads/main@{#1620373}

commit 5c61647fa6331ad61b0173fb2780e3ce732445dd
Author: Maks Orlovich <morlovich@chromium.org>
Date:   Tue Mar 10 15:57:49 2026 -0700

    Migrate ContentSettingsImageView to SetHighlightedElement.

    This required giving all of them an ElementIdentifier, which we will
    need for the WebUI impl anyway. To support multiple implementations the
    naming was placed in the Model, and the view made to use it
    consistently.

    Loosely inspired by caraitto@'s
    https://chromium-review.googlesource.com/c/chromium/src/+/7591203

    Bug: 489349570
    Change-Id: I6993f6acd2edd1d20a12ec951a4a2e2dfee4a625
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7649608
    Reviewed-by: Andy Paicu <andypaicu@chromium.org>
    Reviewed-by: Kaan Alsan <alsan@chromium.org>
    Commit-Queue: Maks Orlovich <morlovich@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1597382}
2026-05-22 16:57:23 -04:00
Claudio DeSouza 1ab3aa4ac9 [cr149] SplitTabsToolbarButton::split_tab_menu_ type changed
This method is now declared as `SplitTabMenuModel`. This required a very
smalll adjustment on how we were overriding this field.

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

commit f34139620b55ba9d211adaf6a6ae0315d1cc7aa2
Author: Russ Hamilton <behamilton@google.com>
Date:   Fri Apr 24 09:44:56 2026 -0700

    Also test WebUI in split tabs button interactive ui tests

    Bug: 493228701
    Change-Id: Ia39b010af06cc9f0ee5dc9142b65851daa00dd53
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7668981
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Reviewed-by: Qingxin Wu <qingxinwu@google.com>
    Commit-Queue: Russ Hamilton <behamilton@google.com>
    Cr-Commit-Position: refs/heads/main@{#1620272}
2026-05-22 16:25:14 -04:00
Claudio DeSouza d38d733dde [cr149] PageActionPerActionMetricsRecorder renamed
This PR fixes the plaster for `PageActionPerActionMetricsRecorder`,
which has to use the new `PageActionMetricsRecorder`. This PR also
improves the plaster to disable any `Record` functions in this class, so
we can notified when new ones are added.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/42d106dd97f5729ff8ccf50171f3dc87798d76d8

commit 42d106dd97f5729ff8ccf50171f3dc87798d76d8
Author: Kaan Alsan <alsan@chromium.org>
Date:   Fri Apr 24 14:29:50 2026 -0700

    Consolidate PageAction Metrics Recording using ScopedMultiSourceObservation

    This CL transitions the PageAction metrics recording system from
    multiple ScopedObservation-based recorders to a single
    PageActionMetricsRecorder using ScopedMultiSourceObservation.

    Previously, we had count(page actions) * count(tabs) metrics recorder
    objects, which duplicated GURLs and created many individual scoped
    observations. This CL improves efficiency by sharing navigation state
    across all actions in a tab and reducing the total number of
    observations. With local profiling (with debug parameters on), this
    saves ~100KB per tab, with 31 page actions enabled.

    Key changes:
    - Merged per-action and page-level metrics logic into a unified
      PageActionMetricsRecorder.
    - Updated PageActionModelInterface to include GetActionId() for
      identification in the consolidated recorder.
    - Refactored PageActionControllerImpl to manage the unified recorder.
    - Deleted the redundant PageActionPageMetricsRecorder.
    - Updated unit tests and test support classes to align with the new
      architecture.

    Bug: 384074251
    Change-Id: I1aeb2205b4d36de3af68d70404ce459babf1dbef
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7790756
    Commit-Queue: Kaan Alsan <alsan@chromium.org>
    Reviewed-by: Foromo Daniel Soromou <koretadaniel@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1620471}
2026-05-22 16:25:14 -04:00
Claudio DeSouza 13b76181b5 [cr149] TemplateURLTableModel::RowCount deleted
A new member `engine_count()` serves the same purpose.

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

commit 0bd93729174039f678c71990a698215207d985b5
Author: Amelie Schneider <amelies@google.com>
Date:   Thu Apr 23 08:29:23 2026 -0700

    [Search] Remove unused TemplateURLTableModel functions

    The experiment `SearchSettingsUpdate` included a refactoring to stop
    using the table model for accessing the template URL service but
    accessing it directly through the keyword controller instead. Some
    functions are already unused and can be removed, the
    TemplateURLTableModel as a whole should be removed once the flag is
    launched.

    This also excludes KeywordEditorController for Android, since it is not
    used there.

    Bug: 498543733, 490316630
    Change-Id: Ie7ab74e7eece7485c85a678b89a48f1cb15a9a94
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7768616
    Reviewed-by: Nicolas Dossou-Gbété <dgn@chromium.org>
    Commit-Queue: Amelie Schneider <amelies@google.com>
    Cr-Commit-Position: refs/heads/main@{#1619543}
2026-05-22 16:25:12 -04:00
Claudio DeSouza 7d865d3fee [cr149] Remove unused inclusion for WatermarkView
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/88bfa4ef4b4486a2fbb00d4568973ba3291215ee

commit 88bfa4ef4b4486a2fbb00d4568973ba3291215ee
Author: Nasser Al-shawwa <alshawwa@chromium.org>
Date:   Thu Apr 23 12:49:17 2026 -0700

    [Tab Share Protection] Rename WatermarkView to DataProtectionOverlayView

    The view being renamed will be used to draw overlays other than the
    watermark, for data protection. As a result, it should be renamed to
    reflect this new use-case.

    Bug: 505461536
    Change-Id: I3c97954af81ae1de7db1dffdc5459b9d13c9bd47
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7788830
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Reviewed-by: Caroline Rising <corising@chromium.org>
    Commit-Queue: Nasser Al-shawwa <alshawwa@chromium.org>
    Reviewed-by: Lei Zhang <thestig@chromium.org>
    Reviewed-by: Lina Ismail <ismaill@google.com>
    Cr-Commit-Position: refs/heads/main@{#1619713}
2026-05-22 16:25:12 -04:00
Claudio DeSouza 40c3d6b3dd [cr149] ContentSettingPermissionResolver dropped from request data
This changes the constructor calls, and this change corrects that. For
the only use of `PermissionDescriptor` in the constructor, a default
constructor is being used because there is no blink value for the
permission name for `RequestType::kBraveOpenAIChat`, so we set that
separately.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/35ad82c9803604df82915104d4d062cd851214f7

commit 35ad82c9803604df82915104d4d062cd851214f7
Author: Antonio Sartori <antoniosartori@chromium.org>
Date:   Thu Apr 23 10:37:35 2026 -0700

    [permissions] Refactor PermissionRequestData

    This CL refactors PermissionRequestData so that it becomes again a
    data-only struct (which can be e.g. cloned) by removing the
    PermissionResolver member. This allows simplifying
    GeolocationPermissionContextAndroid, where we don't need to recreate
    fake PermissionRequestData for the callbacks anymore.

    The refactoring unfortunately implies adapting all callsites, which
    however become more natural as they don't need to instantiate a
    PermissionResolver anymore.

    R=hempjudith@google.com

    Change-Id: Ib7883e9f7cac32ef4039ce3098275ad9018f47d3
    Bug: 443898320
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7780845
    Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
    Reviewed-by: Javier Fernandez <jfernandez@igalia.com>
    Reviewed-by: Judith Hemp <hempjudith@google.com>
    Reviewed-by: Marc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1619624}
2026-05-22 16:25:11 -04:00
Claudio DeSouza 2d399e9c58 [cr149] Unused feed v2 sources deleted
Thse deleted sources were not being used in brave by now.

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

commit c292b11c4c59f447df88a89cf081ae078dcd9711
Author: Yanling <yanlinghu@google.com>
Date:   Wed Apr 22 14:06:18 2026 -0700

    [Feed] Part5 of remove web feed feature: Remove web_feed in chrome/browser/feed

    This CL removes C++ files related to the web feed feature in
    chrome/browser/feed, deletes associated preference keys, and cleans up
    obsolete features and field trials.

    The changes include:

    1. Removed Preference Keys: kHasSeenWebFeed and kLastBadgeAnimationTime
    * Added in: https://chromium-review.git.corp.google.com/c/chromium/src/+/3950805
    * Deletion reference: https://chromium-review.git.corp.google.com/c/chromium/src/+/7681056
    * Followed deletion instruction in https://chromium.googlesource.com/chromium/src/+/main/chrome/browser/prefs/README.md#deleting-an-old-pref

    2. Removed Field Trial: FollowingFeedFollowCount
    * Added in: https://chromium-review.git.corp.google.com/c/chromium/src/+/3142168

    3. Removed Histogram:
    ContentSuggestions.Feed.WebFeed.PageInformationRequested
    * Added in: https://chromium-review.git.corp.google.com/c/chromium/src/+/3470436
    * Instruction used: https://chromium.googlesource.com/chromium/src/+/main/tools/metrics/histograms/README.md#obsolete

    4. Removed features flags:
    - FEED_FOLLOW_UI_UPDATE
       * Added in:
    https://chromium-review.git.corp.google.com/c/chromium/src/+/4584421
    https://chromium-review.git.corp.google.com/c/chromium/src/+/4895066

    - WEB_FEED_AWARENESS
       * Added in:
    https://chromium-review.git.corp.google.com/c/chromium/src/+/3579289
    https://chromium-review.git.corp.google.com/c/chromium/src/+/3615264
    https://chromium-review.git.corp.google.com/c/chromium/src/+/3900453

    OBSOLETE_HISTOGRAM[ContentSuggestions.Feed.WebFeed.PageInformationRequested]=expired
    2026-09-04.

    Cq-Include-Trybots: luci.chrome.try:android-internal-binary-size;luci.chrome.try:android-internal-rel;luci.chrome.try:android-internal-dbg
    Bug: 407797637
    Change-Id: I22bdc208ad07b0538425830ca66f38784aecf98b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7777108
    Reviewed-by: Dominic Battré <battre@chromium.org>
    Reviewed-by: Xi Han <hanxi@chromium.org>
    Commit-Queue: Yanling Hu <yanlinghu@google.com>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Reviewed-by: Tarun Bansal <tbansal@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1619073}
2026-05-22 16:25:11 -04:00
Claudio DeSouza 5f1d48ebae [cr149] ToolbarView now handles WebUIAvatarToolbarButton
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/92e1d0754efe156568908375462e8e1e774727ee

commit 92e1d0754efe156568908375462e8e1e774727ee
Author: Russ Hamilton <behamilton@google.com>
Date:   Wed Apr 22 13:48:50 2026 -0700

    Implement WebUIAvatarToolbarButton stub

    This commit implements the WebUIAvatarToolbarButton C++ class, which
    serves as the backend for the WebUI-based avatar button. It is wired
    into WebUIToolbarWebView and ToolbarView, although Mojo communication is
    not yet established.

    Specifically:
    - Added WebUIAvatarToolbarButton class in chrome/browser/ui/views/toolbar/
    - Updated WebUIToolbarWebView to own and provide WebUIAvatarToolbarButton.
    - Updated ToolbarView to use WebUIToolbarWebView's avatar toolbar button
      when the kWebUIAvatarButton feature is enabled.

    Bug: 470045174
    Change-Id: I8a6d676efb8821841f30615c096b01ab3c927db0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7685013
    Reviewed-by: Maks Orlovich <morlovich@chromium.org>
    Commit-Queue: Russ Hamilton <behamilton@google.com>
    Reviewed-by: Caroline Rising <corising@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1619066}
2026-05-22 16:25:10 -04:00
Claudio DeSouza 5fe7b5b8fd [cr149] //chrome/browser/lifetime modularised
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/94c8534414d7e52827cc07353185709210aa98e8

commit 94c8534414d7e52827cc07353185709210aa98e8
Author: Erik Chen <erikchen@chromium.org>
Date:   Wed Apr 22 11:38:16 2026 -0700

    Modularize //chrome/browser/lifetime

    Extracts the `lifetime` sources (application_lifetime, browser_shutdown,
    browser_close_manager, restartability_monitor, etc.) out of the
    monolithic `//chrome/browser` target into dedicated
    `//chrome/browser/lifetime:lifetime` (public headers) and
    `//chrome/browser/lifetime:impl` targets. Platform-specific sources
    (android, chromeos, mac, aura) are conditionally included via the new
    BUILD.gn rules. All downstream BUILD.gn files that previously relied on
    the bundled target now declare an explicit dep on
    `//chrome/browser/lifetime`. A circular-dep note is preserved explaining
    why `:impl` still has to live under `//chrome/browser` and
    `//chrome/browser/ui`.

    AGENT_GENERATED_CL

    Bug: 353332589
    Change-Id: I9235a54772bc0941e313dba3e0f7eec495ab1ae0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7786609
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618994}
2026-05-22 16:25:10 -04:00
Claudio DeSouza abbf8cc947 [cr149] IsWebContentsVisible cannot be override through Browser
Browser doesn't inherit from `ChromeWebModalDialogManagerDelegate`
anymore. This change fixes our code by directly patching
`ChromeWebModalDialogManagerDelegate` to have an override for this
method.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/083c2a8b08fff93b74aac4f4acd89c5d1fb206ea

commit 083c2a8b08fff93b74aac4f4acd89c5d1fb206ea
Author: Qikai <qikaizhong@microsoft.com>
Date:   Tue Apr 21 22:53:26 2026 -0700

    [bedrock] Move ChromeWebModalDialogManagerDelegate to BrowserWindowFeatures

    Extract ChromeWebModalDialogManagerDelegate from Browser into a new
    BrowserWindowModalDialogDelegate owned by BrowserWindowFeatures. The
    new class manages per-tab WebContentsModalDialogManager delegate
    registration via TabStripModelObserver and handles tab blocking,
    fullscreen exit, and dialog host lookup.

    Browser retains a thin SetWebContentsBlocked() override for
    DesktopBrowserWindowCapabilitiesDelegate, forwarding to the feature.
    DevTools scrim visibility uses a callback pattern subscribed by
    BrowserView.

    Bug: 496674143
    Change-Id: Ia8aea00b733e113c5ca9e9e79d28a37061eb8ced
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7738543
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Commit-Queue: Qikai Zhong <qikaizhong@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1618668}
2026-05-22 16:25:09 -04:00
Claudio DeSouza c74b5da1ec [cr149] BrowserList was deleted
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/499cfaea23ab8386461cbfeec1c4a2dcbd8ca8f6

commit 499cfaea23ab8386461cbfeec1c4a2dcbd8ca8f6
Author: Thomas Lukaszewicz <tluk@chromium.org>
Date:   Wed Apr 22 11:19:07 2026 -0700

    [bedrock] Remove BrowserList

    There are no remaining clients of BrowserList and no behavior changes
    in this CL.

    The changes involve removing the files and cleaning up any remaining
    includes / comments.

    Bug: 431671320
    Change-Id: Ie61bbd3f8371cd5777d179d08ac4f47b9e29dd01
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7744394
    Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1618978}
2026-05-22 16:25:09 -04:00
Claudio DeSouza 75804a38a6 [cr149] //chrome/browser/metrics modularised
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/29684164c168bf8ed4f099183c0d924c0e015a48

commit 29684164c168bf8ed4f099183c0d924c0e015a48
Author: Erik Chen <erikchen@chromium.org>
Date:   Tue Apr 21 12:02:21 2026 -0700

    Modularize //chrome/browser/metrics

    This CL refactors the build graph for `chrome/browser/metrics` by moving
    its sources out of the top-level `//chrome/browser` static library into
    dedicated `source_set("metrics")` (public headers) and
    `source_set("impl")` targets within `chrome/browser/metrics/BUILD.gn`.
    Consumer `BUILD.gn` files across the tree are updated to depend directly
    on `//chrome/browser/metrics`, and a parallel split is applied to
    `chrome/browser/updates`. A few `#include` lines gain `// nogncheck`
    annotations and one forward-declaration of
    `glic::GlicSyntheticTrialManager` replaces a header include to break a
    dep cycle. No functional code changes.

    AGENT_GENERATED_CL

    Bug: 353332589
    Change-Id: I1f549eb8cf92bcf0074946706625f46f27f0fb93
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7777321
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618360}
2026-05-22 16:25:06 -04:00
Claudio DeSouza 645d1b92c1 [cr149][WIP] ReadingListPageHandler has WebContentsObserver
The brave version of this class was using this observer, but now that
base class has introduced it, we can just rely on that.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/68cc838450946381bec6c1c777ede5494715f608

commit 68cc838450946381bec6c1c777ede5494715f608
Author: Foromo Daniel Soromou <koretadaniel@chromium.org>
Date:   Tue Apr 21 08:04:31 2026 -0700

    [Side Panel] Fix dangling WebContents pointer in ReadingListPageHandler

    This patch resolves a dangling pointer issue in ReadingListPageHandler
    by replacing the `DanglingUntriaged` raw pointer to
    `content::WebContents` with a `base::WeakPtr<content::WebContents>`.

    Because `WebContents` can be destroyed before the
    `ReadingListPageHandler` (e.g., during teardown), accessing the dangling
    raw pointer could lead to Use-After-Free (UAF) bugs . Null checks have
    been added to safely return early in cases where `web_contents_` has
    already been invalidated.

    Bug: 490505884
    Change-Id: I411121440d26ee770a775eda6d564ea56a385dbf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7775987
    Reviewed-by: Eshwar Stalin <estalin@chromium.org>
    Commit-Queue: Foromo Daniel Soromou <koretadaniel@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618202}
2026-05-22 16:25:06 -04:00
Claudio DeSouza 44051d8b9f [WIP][cr149] AvatarToolbarButton using more of state_manager_
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/707451f29b5a5a281bce186698ebe50f7ed4d46e

commit 707451f29b5a5a281bce186698ebe50f7ed4d46e
Author: Russ Hamilton <behamilton@google.com>
Date:   Tue Apr 21 12:31:01 2026 -0700

    [AvatarButton] Refactor logic into AvatarToolbarButtonStateManager

    This refactor moves significant business logic and state management
    out of AvatarToolbarButton and into AvatarToolbarButtonStateManager.
    The StateManager now serves as the central dispatcher for button
    events and manages both internal state transitions and external
    observers.

    Key changes:
    - Moved signin::IdentityManager observation to StateManager.
    - Moved IPH (In-Product Help) trigger logic to StateManager.
    - Moved accessibility label calculation logic.
    - Relocated and consolidated AvatarToolbarButtonInterface::Observer
      management in the StateManager.
    - Introduced initialization and update guards to prevent race
      conditions and recursion.
    - Relocated global settings (g_iph_min_delay_after_creation) to the
      StateManager.

    This continues the effort to simplify the view implementation and
    prepare for a shared logic layer between Views and future WebUI
    components.

    Bug: 470045174
    Change-Id: I80ced74336cdc6d05fb65279d803e94aaeb9160d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7771034
    Auto-Submit: Russ Hamilton <behamilton@google.com>
    Commit-Queue: Russ Hamilton <behamilton@google.com>
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618372}
2026-05-22 16:25:06 -04:00
Claudio DeSouza 611ecdf354 [cr149] //chrome/browser/first_run modularised
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/03702156827220b6df76964a262caf312e8fa0f4

commit 03702156827220b6df76964a262caf312e8fa0f4
Author: Keybo Qian <keybo@google.com>
Date:   Fri Apr 17 12:00:06 2026 -0700

    Modularize //chrome/browser/first_run

    Extract the `first_run` feature out of the monolithic `//chrome/browser`
    and `//chrome/test` targets into its own dedicated `BUILD.gn` file.

    - Extracts prod code, `unit_tests`, and `browser_tests` into
      `//chrome/browser/first_run/BUILD.gn`.
    - Adds a `DEPS` file to enforce strict dependency boundaries.
    - Extracts `scoped_relaunch_chrome_browser_override` to a `test_support`
      target.
    - Guards `browser_tests` with `!is_android` to fix compile failures.
    - Adds temporary circular include exceptions to unblock the extraction.

    This refactoring is part of the ongoing effort to break down the Chrome
    browser monolith, which helps improve build times, enforces stricter
    dependency boundaries, and makes the codebase easier to maintain.

    Cq-Include-Trybots: luci.chromium.try:android-cast-arm-rel
    Bug: 500390199
    Change-Id: I2d62edb19cfe1b1f241e21fe31e9cae7df974e8b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7763734
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Auto-Submit: Keybo Qian <keybo@google.com>
    Commit-Queue: Keybo Qian <keybo@google.com>
    Cr-Commit-Position: refs/heads/main@{#1616736}
2026-05-22 16:25:06 -04:00
Claudio DeSouza e45264bb6c [cr149] ToolbarButtonProvider now unowned data
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d37c85afb67b54cef97da7097943b250dc8e6590

commit d37c85afb67b54cef97da7097943b250dc8e6590
Author: Thomas Lukaszewicz <tluk@chromium.org>
Date:   Mon Apr 20 11:08:23 2026 -0700

    [bedrock] Update ToolbarButtonProvider to support UnownedUserData

    Allows clients to depend on ToolbarButtonProvider without a
    direct dependency on BrowserView or Browser.

    Bug: 502745808
    Change-Id: If060854181eceba5942c69570f36e3cbb2ac7af9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7770291
    Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
    Reviewed-by: David Yeung <dayeung@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1617621}
2026-05-22 16:25:05 -04:00
Claudio DeSouza 824695407f [cr149] Fixing kLearnMoreLink override and others
This change fixes the replacement of this constant, which would require
a patch from now on, so now it is managed by a plaster.

`AskBeforeHttpDialogController::HasOpenDialogWidget` also got renamed.

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

commit b09b2ab7d59f05f8ec5342a75c830731e31fcdf1
Author: Chris Thompson <cthomp@chromium.org>
Date:   Mon Apr 20 13:07:57 2026 -0700

    [ABH] Port Ask-before-HTTP dialog to Android

    This ports the Ask-before-HTTP warning dialog to Android and adds
    Android UI test coverage in AskBeforeHttpDialogTest.

    ModalDialogWrapper is updated to plumb the dismissal cause back to the
    native side so the dialog controller can differentiate between a user
    explicitly dismissing the dialog (e.g., via the back button) versus the
    tab disappearing for other reasons (e.g., tab switching). The
    AskBeforeHttpDialogController is also updated to observe WebContents
    visibility to handle dialog restoration after tab switching on Android
    (to match the Desktop behavior where the tab modal is "sticky" to the
    tab even when it goes to the background).

    NO_IFTTT=intentional renaming inside blocks

    Bug: 351990829
    Change-Id: Ia95068e5c69762eae26ab9cc137b1f06e05d6a48
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7753961
    Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Jack Thiesen <jthiesen@chromium.org>
    Commit-Queue: Chris Thompson <cthomp@chromium.org>
    Reviewed-by: Alison Gale <agale@chromium.org>
    Auto-Submit: Chris Thompson <cthomp@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1617725}
2026-05-22 16:25:05 -04:00
Claudio DeSouza 75e381f5a4 [android][cr149] ChromeBaseCheckBoxPreference dropped from sync settings
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/008e21eee2ca1b4d967a68367121423f6e411e2b

commit 008e21eee2ca1b4d967a68367121423f6e411e2b
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Mon Apr 20 04:59:40 2026 -0700

    [sync/android] Remove sync-the-feature code in ManageSyncSettings

    kForceMigrateSyncingUserToSignedIn was enabled by default on Android
    in M148.

    OBSOLETE_HISTOGRAMS=The sync error card was removed, along with its histograms.

    Bug: 40066949
    Change-Id: I8317957d3ad7cdeecaac415a11a2974af90d65d4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7772912
    Reviewed-by: Ankush Singh <ankushkush@google.com>
    Reviewed-by: Marc Treib <treib@chromium.org>
    Commit-Queue: Victor Vianna <victorvianna@google.com>
    Auto-Submit: Victor Vianna <victorvianna@google.com>
    Cr-Commit-Position: refs/heads/main@{#1617409}
2026-05-22 16:25:05 -04:00
Claudio DeSouza 2d41d7aa65 [cr149] UpdateDevtools simplified
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/01ff99168958e53d2a5a0e7bef3e14d13cbcfe96

commit 01ff99168958e53d2a5a0e7bef3e14d13cbcfe96
Author: Thomas Lukaszewicz <tluk@chromium.org>
Date:   Sun Apr 19 17:11:57 2026 -0700

    Simplify DevtoolsUIController

    DevtoolsUIController::UpdateDevtools is updated to only take the
    target web contents - instead of the container view and web contents.

    The implementation assumes that the container view was the host of
    web contents, however this can be easily resolved from just the
    web contents itself within the DevtoolsUIController and mitigates
    the risk of the params drifting.

    Removes a DeprecatedLayoutImmediately() call from
    BrowserView::UpdateDevTools() which has been in the codebase since
    2009 and is no longer necessary. Instead layout is invalidated if
    necessary.

    Note: DevtoolsUIController::UpdateDevTools() still needs to return
    whether a layout is required as BrowserView may need to perform
    a synchronous layout operation separately from marking the layout
    as invalid.

    Bug: 502745808
    Change-Id: I627a45dca0c975a5d422b2aedfa75bd4de8134a2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7766514
    Reviewed-by: Darryl James <dljames@chromium.org>
    Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1617272}
2026-05-22 16:25:05 -04:00
Claudio DeSouza ba22be5679 [cr149] GetAvatarToolbarButton() deleted
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/6c9ccc1c9d53aee2a221dc37dab54b167fb3e09c

commit 6c9ccc1c9d53aee2a221dc37dab54b167fb3e09c
Author: Russ Hamilton <behamilton@google.com>
Date:   Fri Apr 17 09:50:05 2026 -0700

    [WebUI Avatar] Migrate callers to AvatarToolbarButtonInterface

    This CL migrates all usages of
    ToolbarButtonProvider::GetAvatarToolbarButton() to use
    GetAvatarToolbarButtonInterface() instead. This is part of the effort to
    make toolbar components framework-agnostic and support both Views and
    WebUI implementations of the avatar button.

     - Remove the deprecated GetAvatarToolbarButton() method from the
       ToolbarButtonProvider interface.
     - Remove implementations of GetAvatarToolbarButton() in ToolbarView
       and WebAppFrameToolbarView.
     - Migrate all production and test callers to use the interface and its
       framework-agnostic methods.
     - Update includes across the codebase to prefer
       avatar_toolbar_button_interface.h over avatar_toolbar_button.h where
       the concrete type is no longer needed.

    Bug: 470045174
    Change-Id: Iff0147b3ba6eb354a893115be873eb27808150f8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7727070
    Reviewed-by: Ryan Sultanem <rsult@google.com>
    Auto-Submit: Russ Hamilton <behamilton@google.com>
    Commit-Queue: Russ Hamilton <behamilton@google.com>
    Cr-Commit-Position: refs/heads/main@{#1616641}
2026-05-22 16:25:04 -04:00
Claudio DeSouza ca98abdf61 [cr149] Reanchoring clipboard_host_impl.h override
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/32963b6b2e6886a83b4c5bb02d938f209bb54400

commit 32963b6b2e6886a83b4c5bb02d938f209bb54400
Author: Ahmed Raslan <rslan@google.com>
Date:   Thu Apr 16 11:24:18 2026 -0700

    Unify ClipboardEndpoint creation

    This change centralizes the logic for creating ui::DataTransferEndpoint
    and content::ClipboardEndpoint instances by moving the helper functions
    CreateDataEndpoint and CreateClipboardEndpoint into
    content/public/browser/clipboard_types.h

    Bug: 410835513
    Change-Id: I42461c2551fa3ddbd479f4c2c47c1d18417eeba7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7748266
    Reviewed-by: Bo Liu <boliu@chromium.org>
    Reviewed-by: Dominique Fauteux-Chapleau <domfc@chromium.org>
    Reviewed-by: Nasko Oskov <nasko@chromium.org>
    Commit-Queue: Ahmed Raslan <rslan@google.com>
    Cr-Commit-Position: refs/heads/main@{#1616013}
2026-05-22 16:25:04 -04:00
Claudio DeSouza 1a56382987 [cr149] Fixing @typescript-eslint/no-explicit-any
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3de9c88e2d8b97d42020b68371f93044d366d3f4

commit 3de9c88e2d8b97d42020b68371f93044d366d3f4
Author: dpapad <dpapad@chromium.org>
Date:   Fri Apr 17 12:17:03 2026 -0700

    WebUI: Fix violations of @typescript-eslint/no-explicit-any, part 5.

    Bug: 494464740
    Change-Id: I5dc211b93b5c7dcd6cb61fb92451b0d4d11d3742
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7769450
    Reviewed-by: Fred Shih <ffred@chromium.org>
    Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616760}
2026-05-22 16:25:04 -04:00
Claudio DeSouza ee21a68e88 [cr149] Correcting how PageActionPassKey is passed around
This follows the upstream change to change the type alias.

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

commit 2e10893b38937e012a704bcfc3fe0d31e2a5e6a6
Author: Kaan Alsan <alsan@chromium.org>
Date:   Fri Apr 17 08:39:41 2026 -0700

    Refactor PageActionController to decouple from PageActionView

    Change-Id: Ibbe900b983c980e7af502e89eda530082015dd4c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7755799
    Commit-Queue: Kaan Alsan <alsan@chromium.org>
    Reviewed-by: Muhammad Salmaan <musalmaan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616595}
2026-05-22 16:25:04 -04:00
Claudio DeSouza 3b6b6f1a07 [cr149] window_finder.h moved under dragging/
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/65bd2a06e6234336695791f408fa1de79f6d9c83

commit 65bd2a06e6234336695791f408fa1de79f6d9c83
Author: Alison Gale <agale@chromium.org>
Date:   Thu Apr 16 11:46:19 2026 -0700

    Move window finder into dragging subfolder

    Bug: 475568167
    Change-Id: I21eb567e5c5b69bd83be735d2d81b271ea75274b
    Bypass-Check-License: files moved
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7762340
    Commit-Queue: Alison Gale <agale@chromium.org>
    Reviewed-by: Vince Lugli <lugli@google.com>
    Cr-Commit-Position: refs/heads/main@{#1616028}
2026-05-22 16:25:03 -04:00
Claudio DeSouza dd6dae5f42 [cr149] tab_strip_observer.h moved under shared/
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0c88dc794ab433f902d690ed5d793b535c79c8c2

commit 0c88dc794ab433f902d690ed5d793b535c79c8c2
Author: Alison Gale <agale@chromium.org>
Date:   Thu Apr 16 13:17:30 2026 -0700

    Move shared tabs files to shared subdirectory

    Bug: 475568167
    Change-Id: I3099c519174a4860701c64c46c61bea0f3801234
    Bypass-Check-License: Moving files
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7763412
    Auto-Submit: Alison Gale <agale@chromium.org>
    Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
    Reviewed-by: Vince Lugli <lugli@google.com>
    Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616085}
2026-05-22 16:25:03 -04:00
Claudio DeSouza 00d7fccd8a [cr149] Several fixes around NativeFrameViewLinux
With this CL moving things around, this has caused a lot small issues
in several places where unwanted replecaments started to occur, or other
types of failures, like name collision.

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

commit e0f759f728337f7df2f808ebc2c1eefffab5c5e3
Author: Athul Iddya <athul@iddya.com>
Date:   Thu Apr 16 17:08:08 2026 -0700

    Add a native frame view for non-browser widgets on Linux

    Introduces NativeFrameViewLinux, a FrameViewLinux subclass that provides
    native client-side decorations for non-browser widgets on Linux. This
    class is preferred over FrameViewLinux for the GTK UI theme. Its
    implementation mirrors BrowserFrameViewLinuxNative, using
    WindowFrameProvider for frame decoration and NavButtonProvider for
    window control buttons.

    NativeFrameViewLayoutLinux similarly extends FrameViewLayoutLinux to
    override frame and button layout decisions using WindowFrameProvider and
    NavButtonProvider. Shared utilities between NativeFrameViewLinux and
    BrowserFrameViewLinuxNative are extracted into frame_view_utils_linux.

    WindowFrameProvider and NativeTheme gain options for non-browser frame
    rendering: top area height, padding and border APIs, and bottom border
    drawing in the top area, to match the appearance of native GTK dialogs.

    Bug: 396190939
    Cq-Include-Trybots: luci.chromium.try:linux-wayland-mutter-rel,linux-wayland-weston-rel
    Change-Id: Iee94d493a1751176c38d793e7efcfe47271bc909
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7615475
    Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
    Auto-Submit: Athul Iddya <athul@iddya.com>
    Reviewed-by: David Yeung <dayeung@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616203}
2026-05-22 16:25:03 -04:00
Claudio DeSouza b4591a82e3 [cr149] Update BraveUpdateClientConfig ctor calls
`ChromeUpdateClientConfig` has dropped the `url_override` arg. Th change
also removes an unnecessary patch for `ChromeUpdateClientConfig` which
was causing issues.

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

commit e585ba13ce9ed5667530a315850713c1eeb3cd20
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Fri Apr 17 07:58:49 2026 -0700

    extension updater: Use update_client updater for sync/policy installs

    Previously, the first install of an extension (when driven by sync or
    policy) would still default to using the old extension update stack.
    This isn't necessary; the new stack can be used in this case.

    This relands
    https://chromium-review.googlesource.com/c/chromium/src/+/7545510
    The original CL is patchset 1. Since then,
    ExternalProviderImplTest.InAppPayments (which isn't covered by CQ)
    is fixed, which was unfortunately a bigger job than I hoped.

    Fixed: 482088398, 500551122
    Change-Id: Iee3d224770896f5abc288d1facbd492f67ef9554
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7769170
    Reviewed-by: Owen Min <zmin@chromium.org>
    Auto-Submit: Joshua Pawlicki <waffles@chromium.org>
    Commit-Queue: Joshua Pawlicki <waffles@chromium.org>
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616564}
2026-05-22 16:25:03 -04:00
Claudio DeSouza fed5a45acd [cr149] Upgrading Apple toolchain to 26.4
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/8e4be4466c32838b84511a1f65130f6b7ac097f6

commit 8e4be4466c32838b84511a1f65130f6b7ac097f6
Author: Devon Loehr <dloehr@google.com>
Date:   Fri Apr 17 09:48:46 2026 -0700

    mac: Switch to Xcode 26.4 (17E192) and SDK 26.4 (25E236)

    Additionally, update the instructions in xcode_binaries.yaml to make it
    more convenient to compute the version numbers during the cipd upload.

    Bug: 503714260
    Change-Id: Ie981bc0d96118293194300ef8506070d91331847
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7726997
    Reviewed-by: Hans Wennborg <hans@chromium.org>
    Reviewed-by: Mark Mentovai <mark@chromium.org>
    Commit-Queue: Devon Loehr <dloehr@google.com>
    Cr-Commit-Position: refs/heads/main@{#1616640}
2026-05-22 16:25:02 -04:00
Claudio DeSouza b8aa9d78ba [cr149] components/os_crypt/sync deleted
Remove any remnants of os_crypt/sync from Brave - all Brave code has
already been transitioned to async OSCrypt.

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

commit a4cab4afb48c24f4557ec6dc7cbd1bd192fb65b4
Author: Tom Anderson <thomasanderson@chromium.org>
Date:   Fri Apr 17 15:10:45 2026 -0700

    [OSCrypt] Remove sync backend

    R=thestig

    Fixed: 447372315
    Change-Id: I56d58c4326aa74f540370cd1daf6cf974b15d4d6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7765593
    Reviewed-by: Lei Zhang <thestig@chromium.org>
    Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616892}
2026-05-22 16:25:02 -04:00
Claudio DeSouza affc277c28 [cr149] Use //components/one_time_tokens/core/common:features
These features were moved under common

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3fe669867f71303e859e010511f565c174eff5ff

commit 3fe669867f71303e859e010511f565c174eff5ff
Author: Thomas Lottermann <lottermann@google.com>
Date:   Wed Apr 8 02:25:11 2026 -0700

    [OTP] Make One Time Token service URL configurable via FeatureParam.

    This change replaces the hardcoded URL for fetching email one-time
    tokens with a FeatureParam, allowing the service URL to be modified
    through Finch. The default value of the FeatureParam is set to the
    original URL.

    Bug: b:478840986
    Fixed: b:478840986
    Change-Id: I7e0f0a48c1d8fd735d451fc741635a5cfc4460ee
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7711420
    Commit-Queue: Thomas Lottermann <lottermann@google.com>
    Reviewed-by: Matthias Körber <koerber@google.com>
    Reviewed-by: Trang Mai <trangm@google.com>
    Cr-Commit-Position: refs/heads/main@{#1611334}
2026-05-22 16:25:02 -04:00
Claudio DeSouza cffb249298 [cr149] FindLastActiveWithProfile returning BWI
This change allows a couple of more places to be migrated to
`BrowserWindowInterface`.

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

commit e8d0df41d25900497716dd3a4b070c6436fa1a97
Author: Kun Wang <kunwang@microsoft.com>
Date:   Wed Apr 15 23:35:39 2026 -0700

    [bedrock] Migrate FindLastActiveWithProfile Step 1

    Bug: 494010890
    Change-Id: Ie0385deeda2e2f28baf75a810ada0becf5807c78
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7753884
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Commit-Queue: Kun Wang <kunwang@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1615659}
2026-05-22 16:24:59 -04:00
Claudio DeSouza 93b24be10d [cr149] //chrome/browser/password_manager introduced
This is part of the broader browser modularisation.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/9ddae426e2086192e5dcef713af29ccb535784f8

commit 9ddae426e2086192e5dcef713af29ccb535784f8
Author: Erik Chen <erikchen@chromium.org>
Date:   Wed Apr 15 17:38:39 2026 -0700

    Reland "Modularize //chrome/browser/password_manager"

    This reverts commit d781c61029b64c262748f62b5968c3ab85f4cc9f.

    Reason for revert: The revert was not necessary. Two CLs landed at the same time and caused issues:
    https://chromium-review.googlesource.com/c/chromium/src/+/7762999
    https://chromium-review.googlesource.com/c/chromium/src/+/7763756

    Both CLs were reverted. The second revert was not necessary.

    Original change's description:
    > Revert "Modularize //chrome/browser/password_manager"
    >
    > This reverts commit cbf43bd0c009932dcdd962090bfd1bd83aec840d.
    >
    > Reason for revert: Suspect culprit of tree closure https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Builder/119674/overview, https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Builder/119672/overview
    >
    > Original change's description:
    > > Modularize //chrome/browser/password_manager
    > >
    > > This change refactors the `chrome/browser/password_manager` BUILD.gn to
    > > split it into a separate `:password_manager` (headers/public interface)
    > > and `:impl` (implementation) source sets. The file listings are moved
    > > out of the top-level `chrome/browser/BUILD.gn` into the
    > > password_manager-local BUILD.gn, improving modularity. Downstream
    > > BUILD.gn files across the tree are updated to add the new dependency
    > > targets as needed.
    > >
    > > AGENT_GENERATED_CL
    > >
    > > Bug: 353332589
    > > Change-Id: I813398f6d49fc57a247663533d9707d9cd84c04f
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7763756
    > > Commit-Queue: Erik Chen <erikchen@chromium.org>
    > > Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    > > Cr-Commit-Position: refs/heads/main@{#1615417}
    >
    > Bug: 353332589
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Change-Id: I89659141371c73ed2bca7ce278ae052e914dd097
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7765706
    > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
    > Owners-Override: Anthony Cui <cuianthony@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1615431}

    Bug: 353332589
    Change-Id: Ic15570d8da995828e705853aceadcd653e1fed49
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7766729
    Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615521}
2026-05-22 16:24:58 -04:00
Claudio DeSouza 2966bf1d7a [cr149] BookmarkBarController fetched through a static
The accessor is now gone, and `BrowserView::GetBrowserViewForBrowser` is
used in its place.

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

commit aaed67f345e86a74c60a9f666cd19fe898d23605
Author: Thomas Lukaszewicz <tluk@chromium.org>
Date:   Wed Apr 15 11:32:42 2026 -0700

    [bedrock] Move bookmark-related methods to BookmarkBarController

    This CL re-homes bookmark-related methods on BrowserWindow to the
    BookmarkBarController browser window feature. Test-specific methods
    that only have a BrowserView impl have been removed and test code
    updated to check the BrowserView directly.

    This is part of an effort to slim BrowserWindow and better modularize
    browser feature code.

    Bug: 502745808
    Change-Id: I4046786862ff822a6a11c278e25948f478340aa2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7763260
    Reviewed-by: David Yeung <dayeung@chromium.org>
    Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615305}
2026-05-22 16:24:58 -04:00
Claudio DeSouza b832a750a3 [cr149] FindAllTabbedBrowsersWithProfile deleted
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/4650246ccb09055bd278e075fb26055343174087
https://chromium.googlesource.com/chromium/src/+/830564b5f14f755a81fa9f9d5f1e171b568dfc6a

commit 4650246ccb09055bd278e075fb26055343174087
Author: Kun Wang <kunwang@microsoft.com>
Date:   Tue Apr 14 20:46:35 2026 -0700

    [bedrock] Remove FindAllTabbedBrowsersWithProfile() from BrowserFinder

    Bug: 494010890
    Change-Id: I7d237edf67693e11d23397813f06d4e32d27d5a4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7738568
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Commit-Queue: Kun Wang <kunwang@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1614924}

commit 830564b5f14f755a81fa9f9d5f1e171b568dfc6a
Author: Yu He <yhe@microsoft.com>
Date:   Thu Mar 19 12:08:13 2026 -0700

    Reland "[bedrock] FindAllTabbedBrowsersWithProfile() function call point refactoring"

    This is a reland of commit e1e46c26f73c2b52e384e7ea0b59d312ab6399c5

    The original CL was reverted because it caused
    ActorLoadAndExtractContentToolBrowserTest.WindowClosedPrematurely to
    fail on linux-wayland-mutter-rel-tests.

    Root cause: GetActiveWindowId() used ProfileBrowserCollection::ForEach()
    with the default kCreation order. On Wayland, when a new browser window
    is shown via BrowserView::Show(), DidBecomeActive() is called
    synchronously for the new window, but DidBecomeInactive() for the
    previous window only fires asynchronously when the compositor sends a
    "lost focus" event. This means both windows can have IsActive()==true
    simultaneously. With kCreation order, the older (wrong) window was found
    first. The original FindAllTabbedBrowsersWithProfile() iterated in
    activation order, so the most recently shown window was always checked
    first.

    Fix: Pass BrowserCollection::Order::kActivation to ForEach() in
    GetActiveWindowId() to match the original iteration order.

    Also re-enables the WindowClosedPrematurely test on Linux, which was
    disabled by a gardener after the original CL landed.

    Patchset 3 fixes the issue and has been verified locally by running the
    test 50 times under mutter/Wayland without failure.

    Original change's description:
    > [bedrock] FindAllTabbedBrowsersWithProfile() function call point refactoring
    >
    > Migrate all non-test call sites of FindAllTabbedBrowsersWithProfile()
    > from Browser* to BrowserWindowInterface*, adapting downstream method
    > calls accordingly.
    >
    > Call sites migrated:
    > - actor_proto_conversion.cc: session_id() → GetSessionID()
    > - load_and_extract_content_tool_request.cc: session_id() → GetSessionID()
    > - tab_sensitivity_cache.cc: tab_strip_model() → GetTabStripModel()
    >
    > The function still returns std::vector<Browser*>; each call site uses
    > BrowserWindowInterface* as the range-based for loop variable, relying
    > on the implicit upcast from Browser* to BrowserWindowInterface*.
    >
    > Bug: 431671320
    > Change-Id: Ie621746798e54642981b5d2330a653a5f2501821
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7665417
    > Auto-Submit: Yu He <yhe@microsoft.com>
    > Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    > Reviewed-by: Tom Lukaszewicz <tluk@chromium.org>
    > Commit-Queue: Qikai Zhong <qikaizhong@microsoft.com>
    > Cr-Commit-Position: refs/heads/main@{#1600308}

    Bug: 431671320
    Change-Id: I35bd2cc00fc4411c61570be4b906dc3b4dab5dba
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7678191
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Commit-Queue: Tom Lukaszewicz <tluk@chromium.org>
    Reviewed-by: Tom Lukaszewicz <tluk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1602148}
2026-05-22 16:24:57 -04:00
Claudio DeSouza 82a6cc677d [cr149] MV2DeprecationImpactChecker moved and ctor changed
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/b11ac9f51e136dd9f345c3f9f79b83aca5d6cb1f

commit b11ac9f51e136dd9f345c3f9f79b83aca5d6cb1f
Author: Miyoung shin <myid.shin@igalia.com>
Date:   Tue Apr 14 17:37:04 2026 -0700

    Move MV2DeprecationImpactChecker to //extensions

    This CL relocate MV2DeprecationImpactChecker to //extensions since
    it no longer depends on //chrome.

    Bug: 358567092
    Change-Id: Ie50342cb170f33ff1b2ae5981d6f556c134c0ac8
    Bypass-Check-License: Moving files
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7736242
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#1614819}
2026-05-22 16:24:57 -04:00
Claudio DeSouza cb4ca01cfc [cr149] ActorTask::AddTab asks on-dettach behaviour for tab
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c93c5d88e4f60a6586e10ff1ce4a8feeaf3f4248

commit c93c5d88e4f60a6586e10ff1ce4a8feeaf3f4248
Author: Chris Fredrickson <cfredric@chromium.org>
Date:   Wed Apr 15 12:37:06 2026 -0700

    Add LoadAndExtractContent's tabs to ActorTask's tab set

    This ensures that LoadAndExtractContent does not bypass the enterprise
    policy blocklist, sensitive site list, or static navigation blocklist.

    This CL also adds the ability to add a tab to the controlled tabs set
    without stopping the ActorTask when that tab is detached/closed. This is
    needed for the ephemeral tabs created by the LoadAndExtractContent tool.

    Fixed: 497342466
    Change-Id: I355e2bc4ab9a27d52281de10ce6bdc98b50cc43a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7727485
    Reviewed-by: Jeremy Roman <jbroman@chromium.org>
    Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615339}
2026-05-22 16:24:57 -04:00
Claudio DeSouza efd6458b00 [cr149] BrowserListObserver deleted
All classes are being migrated to BrowserCollectionObserver.

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

commit 2ebf7353bb2535b6121d1a26340d3f4e74046e42
Author: Thomas Lukaszewicz <tluk@chromium.org>
Date:   Tue Apr 14 21:51:30 2026 -0700

    [bedrock] Remove BrowserListObserver

    Bug: 431671320
    Change-Id: Iff946bf520ab44049c855d91576ef53ca1916e00
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7744448
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1614935}
2026-05-22 16:24:57 -04:00
Claudio DeSouza d422395bce [cr149][WIP] Fixing @typescript-eslint/no-explicit-any warnings
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/8f97262a2cc5aa37fcd710c3c141eb7f08c01f92

commit 8f97262a2cc5aa37fcd710c3c141eb7f08c01f92
Author: dpapad <dpapad@chromium.org>
Date:   Wed Apr 15 15:03:48 2026 -0700

    WebUI: Enable @typescript-eslint/no-explicit-any where possible.

    Since there are too many violations across the codebase, enabling this
    check by default will take a while. Instead of waiting until all
    violations are fixed before the check is enabled anywhere, enabling it
    for all targets that already don't exhibit any violations.

    As the remaining offending targets are fixed they will be removed from
    the exception list to ensure they can no longer regress after being
    fixed.

    The new check is skipped on Ash-only WebUI targets for now.

    Bug: 494464740
    Change-Id: Iadaa8718b1bb6e0188b80615cf2aff4ec3193588
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7763564
    Reviewed-by: John Lee <johntlee@chromium.org>
    Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615435}
2026-05-22 16:24:56 -04:00
Claudio DeSouza f783ea1495 [cr149] SettingSource::kTpcdGrant deleted
This was being passed along in a place, which can be easily deleted, and
in another place it was being used as a macro anchor, which has been
corrected.

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

commit 4f6f66374bd8fb36de59c75b329361eb1f4a0396
Author: Fiona Macintosh <fmacintosh@google.com>
Date:   Wed Apr 15 01:49:38 2026 -0700

    Delete remaining obsolete 3PCD-related enum values

    Removes k3PCDMetadata, kTpcdGrant, kEnforcedByTpcdGrant

    Change-Id: Id9f3ac6fc20334ade63e62bb01d823396ea30a01
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7749186
    Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
    Commit-Queue: Judith Hemp <hempjudith@google.com>
    Reviewed-by: Judith Hemp <hempjudith@google.com>
    Auto-Submit: Fiona Macintosh <fmacintosh@google.com>
    Reviewed-by: Maks Orlovich <morlovich@chromium.org>
    Reviewed-by: Christian Dullweber <dullweber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615003}
2026-05-22 16:24:56 -04:00
Claudio DeSouza 92d5f95f44 [cr149] WebString::FromUTF8 renamed to FromUTF8
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/98defbb5fe4cd74acc53e9f8d3b3ad9443adda65

commit 98defbb5fe4cd74acc53e9f8d3b3ad9443adda65
Author: Kent Tamura <tkent@chromium.org>
Date:   Wed Apr 15 01:28:25 2026 -0700

    Reland "Remove blink::WebString::FromUTF8()"

    This is a reland of commit 64bea51a34e9a0f68769c2275e939d986f918495

    Differences from the original commit:
    Update `FromUTF8()` in the following files too:
    * chromecast/renderer/activity_filtering_websocket_handshake_throttle.cc
    * components/translate/content/renderer/translate_agent.cc
    * third_party/blink/renderer/core/script_tools/model_context_test.cc

    Original change's description:
    > Remove blink::WebString::FromUTF8()
    >
    > We prefer FromUtf8().
    > This CL has no behavior changes.
    >
    > Bug: 492927412
    > Change-Id: I3976e85012e2189dd4377a7cd49148771970d158
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7760402
    > Commit-Queue: Fredrik Söderquist <fs@opera.com>
    > Owners-Override: Kent Tamura <tkent@chromium.org>
    > Auto-Submit: Kent Tamura <tkent@chromium.org>
    > Reviewed-by: Fredrik Söderquist <fs@opera.com>
    > Cr-Commit-Position: refs/heads/main@{#1614316}

    Bug: 492927412
    Change-Id: I36fa1420e10759ad581bf8d2ccf7552831e10205
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7760406
    Reviewed-by: Fredrik Söderquist <fs@opera.com>
    Commit-Queue: Kent Tamura <tkent@chromium.org>
    Commit-Queue: Fredrik Söderquist <fs@opera.com>
    Owners-Override: Kent Tamura <tkent@chromium.org>
    Auto-Submit: Kent Tamura <tkent@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1614993}
2026-05-22 16:24:56 -04:00
Claudio DeSouza d1e78d9694 [cr149] Fixing unwanted Init substitution
Due to transient header inclusions and with `Init` being a common token,
we've got another unwanted substitution which this preemptive header
inclusion prevents.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/979202122d8d2ae3fffd4ffc027bdb86b78b7232

commit 979202122d8d2ae3fffd4ffc027bdb86b78b7232
Author: Qingxin Wu <qingxinwu@google.com>
Date:   Tue Apr 14 05:40:00 2026 -0700

    [WebUI LLBC] Introduce PermissionChip Interfaces.

    This CL is Phase 1 of decoupling the Left-Hand Side (LHS) location bar
    chips from native Views, preparing for a WebUI implementation.

    It introduces an abstract interfaces: `PermissionChipInterface`.

    The native `PermissionChipView` now inherit from this interface. C++
    controllers (`ChipController` and `PermissionDashboardController`) have
    been refactored to hold pointers to the interfaces rather than concrete
    View classes.

    Bug: 495419742
    Change-Id: I8451110f6c28d267528fa8ed2ead22dbb485e0a9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7705932
    Reviewed-by: Maks Orlovich <morlovich@chromium.org>
    Reviewed-by: Paul Jensen <pauljensen@chromium.org>
    Reviewed-by: Elias Klim <elklm@chromium.org>
    Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
    Commit-Queue: Qingxin Wu <qingxinwu@google.com>
    Cr-Commit-Position: refs/heads/main@{#1614388}
2026-05-22 16:24:55 -04:00
Claudio DeSouza 68624bc8be [cr149] GetAppMenuControl() removed from ToolbarView
We are now accessing this value through a private accessor with the
parent class.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0800caaa61eb1b551c622e41025def941ea6f0c9

commit 0800caaa61eb1b551c622e41025def941ea6f0c9
Author: Youssef Bourouphael <ybourouphael@google.com>
Date:   Tue Apr 14 06:30:17 2026 -0700

    Refactor: Extract AppMenuControl interface

    This change extracts the core functionalities of the app menu button
    into a new `AppMenuControl` interface.

    - Introduced `AppMenuControl` interface defining methods to interact with the app menu button.
    - Updated `AppMenuButton` to implement the new `AppMenuControl` interface.
    - Modified `ToolbarButtonProvider` to expose the `AppMenuControl` interface instead of directly returning `AppMenuButton`.
    - Migrated all call sites that previously accessed `AppMenuButton` directly to use the `AppMenuControl` interface.
    - Updated bubble anchoring logic to utilize `views::BubbleAnchor`, allowing for more flexible anchoring options.
    - Many existing calls to `GetAppMenuButton()` were migrated to use `views::ElementTrackerViews` to get the button view.

    This refactoring is a prerequisite for future work on a Web UI version
    of the app menu.

    Bug: 470045312
    Change-Id: I01d722ad76687e0f1e409f04a4feef4d0386540e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7722207
    Reviewed-by: Paul Jensen <pauljensen@chromium.org>
    Reviewed-by: Eshwar Stalin <estalin@chromium.org>
    Commit-Queue: Youseff Bourouphel <ybourouphael@google.com>
    Cr-Commit-Position: refs/heads/main@{#1614401}
2026-05-22 16:24:54 -04:00
Claudio DeSouza 8771818344 [cr149] extension_allowlist.h moved to new path
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/925b145d425b369c3c71dea1d266b25569a84b60

commit 925b145d425b369c3c71dea1d266b25569a84b60
Author: Miyoung shin <myid.shin@igalia.com>
Date:   Tue Apr 14 02:05:32 2026 -0700

    Move ExtensionAllowlist to //extensions

    This CL relocate ExtensionAllowlist to //extensions since it no
    longer depends on //chrome.

    Bug: 358567092
    Change-Id: I5af107be7b7506123ee53b755eb2da4f6e128cb6
    Bypass-Check-License: Moving files
    Low-Coverage-Reason: TRIVIAL_CHANGE
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7724912
    Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1614325}
2026-05-22 16:24:54 -04:00
Claudio DeSouza 3e5f041d1b [cr149] mv2_experiment_stage.h changed path
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/277ef269ab36909b8f8e0408942855fc67de1a86

commit 277ef269ab36909b8f8e0408942855fc67de1a86
Author: Miyoung shin <myid.shin@igalia.com>
Date:   Mon Apr 13 22:37:48 2026 -0700

    Move mv2_experiment_stage.h to //extensions

    This CL relocate mv2_experiment_stage.h to //extensions since it no
    longer depends on //chrome.

    Bug: 358567092
    Change-Id: I8184bdfcdb3e6cc1dd60e310687f3f5a7b43bd5b
    Bypass-Check-License: Moving files
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7738462
    Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1614234}
2026-05-22 16:24:54 -04:00
Claudio DeSouza e676e448a9 [cr149] SetCanonicalCookieAsync dropping default arg value
This is just a mirror of the change in upstream.

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

commit 4d84d8a0cdb1b946de455ec1f511c7205f9b27ab
Author: Chris Fredrickson <cfredric@chromium.org>
Date:   Mon Apr 13 02:15:19 2026 -0700

    Remove default args from CookieStore virtual methods

    Virtual methods are forbidden to have default arguments by the style
    guide
    (https://google.github.io/styleguide/cppguide.html#Default_Arguments).

    Change-Id: I42528f3dd0aa2750cd6a1d773e53f6f4d5fc3891
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7726975
    Reviewed-by: Joey Arhar <jarhar@chromium.org>
    Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
    Reviewed-by: Rohit Rao <rohitrao@chromium.org>
    Commit-Queue: Victor Vianna <victorvianna@google.com>
    Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
    Reviewed-by: Victor Vianna <victorvianna@google.com>
    Cr-Commit-Position: refs/heads/main@{#1613572}
2026-05-22 16:18:10 -04:00
Claudio DeSouza 2541494417 [cr149] CookieMonster test-only ctor with reduced visibility
This ctor was not meant to be used in production, and now it is being
locked down with a passkey to avoid to accidental uses.

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

commit fa56e60fe80ac8560c65cbf660cd8254fb701d8a
Author: Chris Fredrickson <cfredric@chromium.org>
Date:   Mon Apr 13 08:59:55 2026 -0700

    Restrict visibility of test-only CookieMonster ctor

    This makes it either a compiler-error or a presubmit warning to use the
    test-only ctor inappropriately.

    Change-Id: I549948fc78258f18abb0a4bbacf48e91cd74b83a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7727488
    Reviewed-by: Maks Orlovich <morlovich@chromium.org>
    Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
    Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1613764}
2026-05-22 16:18:10 -04:00
Claudio DeSouza 926443bba6 [cr149] TestBrowserClosedWaiter deleted
This change only removes a inclusion to the header for this class that
was left behind in our code.

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

commit dd0cca1d9573996058b06159d99ef55904eae2a0
Author: Tiago Vignatti <tvignatti@igalia.com>
Date:   Mon Apr 13 05:30:29 2026 -0700

    Remove deprecated TestBrowserClosedWaiter

    Delete TestBrowserClosedWaiter and migrate all callers to use
    ui_test_utils::BrowserDestroyedObserver directly, as the class
    was already marked deprecated. The ASSERT_TRUE wrappers around
    WaitUntilClosed() are dropped since it unconditionally returned
    true.

    This also removes the circular dependency between
    //chrome/browser/ui/test:closed_waiter and
    //chrome/test:test_support_ui.

    Bug: 353332589
    Change-Id: I2685dba2a589870fcf1e6639f511932b2a051178
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706499
    Reviewed-by: Darryl James <dljames@chromium.org>
    Commit-Queue: Tiago Vignatti <tvignatti@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#1613640}
2026-05-22 16:18:10 -04:00
Claudio DeSouza 3fc0b8733b [cr149] GetIndexOfExistingTab deleted
This function has been replaced with a more accurately named one,
`GetIndexOfExistingTabMatchingURL`, which has been declared in a
different header.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3d5e08bc7b5649ff297b7a4026224b1040328de5

commit 3d5e08bc7b5649ff297b7a4026224b1040328de5
Author: Jack Thiesen <jthiesen@chromium.org>
Date:   Mon Apr 13 13:14:15 2026 -0700

    Move Navigation Helpers to Shared Location

    WML's Navigate() implementation relies on helpers inside of
    singleton_tabs.h that are not strictly used for singleton tabs and are
    not used by other code. This change updates these helpers to use
    platform-agnostic abstractions and moves them to a location that allows
    for easy sharing between platforms. New unit tests are added.

    Bug: 469764907
    Change-Id: I7f503ea505adc480037e363abe8534f38e7c8d7b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7747634
    Commit-Queue: Jack Thiesen <jthiesen@chromium.org>
    Reviewed-by: Elly <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1613927}
2026-05-22 16:18:09 -04:00
Claudio DeSouza 7dc349365c [cr149] FindLastActive returning BrowserWindowInterface
This change corrects several cascading places where passing
`BrowserWindowInterface` is already feasible. It also further corrects
some cases `Browser*` and `Profile*` were being passed alongside each
other, which is redundant.

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

commit c6268a491040e14ca749fb2ba8fb131ab7512f87
Author: Kun Wang <kunwang@microsoft.com>
Date:   Sun Apr 12 23:56:11 2026 -0700

    [bedrock] Migrate FindLastActive Step 1

    Bug:494010890

    Change-Id: I52727f56f3e6172515e3f053a74cb81947c9b8f0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7743380
    Reviewed-by: Tom Lukaszewicz <tluk@chromium.org>
    Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
    Commit-Queue: Kun Wang <kunwang@microsoft.com>
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1613517}
2026-05-22 16:18:09 -04:00
Claudio DeSouza 213462eaae [cr149][rust] hashbrown updated to 0.17.0
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f7733a1032027ad3625e8356db8eab4490572128

commit f7733a1032027ad3625e8356db8eab4490572128
Author: Manish Goregaokar <manishearth@google.com>
Date:   Mon Apr 13 11:27:44 2026 -0700

    Roll indexmap: 2.13.1 => 2.14.0 in //third_party/rust.

    This CL has been created semi-automatically.  The expected review
    process and other details can be found at
    //tools/crates/create_update_cl.md

    Updated crates:

    * indexmap: 2.13.1 => 2.14.0; https://docs.rs/crate/indexmap/2.14.0

    New crates:

    * hashbrown@0.17.0; https://docs.rs/crate/hashbrown/0.17.0

    Removed crates:

    * hashbrown@0.16.1; https://docs.rs/crate/hashbrown/0.16.1

    Bug: None
    Cq-Include-Trybots: chromium/try:android-rust-arm32-rel
    Cq-Include-Trybots: chromium/try:android-rust-arm64-dbg
    Cq-Include-Trybots: chromium/try:android-rust-arm64-rel
    Cq-Include-Trybots: chromium/try:linux-rust-x64-dbg
    Cq-Include-Trybots: chromium/try:linux-rust-x64-rel
    Cq-Include-Trybots: chromium/try:win-rust-x64-dbg
    Cq-Include-Trybots: chromium/try:win-rust-x64-rel
    Disable-Rts: True
    Change-Id: I7f0b56f556a564befd67b51f91a4a4668407ab77
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7756739
    Auto-Submit: Manish Goregaokar <manishearth@google.com>
    Reviewed-by: Daniel Rubery <drubery@chromium.org>
    Commit-Queue: Manish Goregaokar <manishearth@google.com>
    Cr-Commit-Position: refs/heads/main@{#1613872}
2026-05-22 16:18:09 -04:00
Claudio DeSouza c538264b6e [cr149] Adding missing push_messaging component
These sources were recently componentised.

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

commit da1937096d3b9787f6c746cfe3e0ca38d9fa13c2
Author: Orko Garai <orko@igalia.com>
Date:   Fri Apr 10 14:39:46 2026 -0700

    Finish modularizing c/b/push_messaging

    Move the remaining push_messaging sources from c/b to
    c/b/push_messaging target.

    Cq-Include-Trybots: luci.chromium.try:android-cast-arm-rel

    Bug: 353332589
    Change-Id: I3a6d5767060edf283015835d1baa550990f60fcd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7718621
    Commit-Queue: Orko Garai <orko@igalia.com>
    Reviewed-by: Darryl James <dljames@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1613110}
2026-05-22 16:18:07 -04:00
Claudio DeSouza 3c6b2847e1 [cr149] ESLint fixes for reactive properties
All the fixes in this change are cases where we are converting a
property to a function as more appropriate.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/9d25d0387044e57a67892521a2863a87c31b9cc9

commit 9d25d0387044e57a67892521a2863a87c31b9cc9
Author: rbpotter <rbpotter@chromium.org>
Date:   Thu Apr 9 23:38:18 2026 -0700

    WebUI: Validate that properties referenced in Lit template are reactive

    Adding an automated check to ensure that if a class property
    "this.someProp" is referenced in the HTML template, it is also properly
    declared as a reactive property so that Lit will re-render the element
    correctly when it changes.

    Bug: 500066216
    Change-Id: Ieb9989fc672d03cb2b20f2bd43301a688b42f270
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7731479
    Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
    Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1612640}
2026-05-22 16:18:07 -04:00
Claudio DeSouza a14306c238 [cr149] Fixing kPageActionProperties patching formating
Recent changes in upstream have changed the tabulation. Although this
has not caused any conflict when applying patches, this change updates
the plaster to better reflect the current desired patching.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/39f1fc11de89a81d446d6ee520973294a4023254

commit 39f1fc11de89a81d446d6ee520973294a4023254
Author: Ian Wells <iwells@chromium.org>
Date:   Tue Apr 7 09:48:58 2026 -0700

    Add contextual cueing v2 page action

    Contextual cueing v2 will show cues for a few different features, so
    while the page action is registered with the other browser actions, its
    icon, anchored message details and click handler aren't set until it's
    time to show a cue for a specific feature.

    Bug: 497231692
    Change-Id: I641e13d43661806a64759018a837f6fe316bfaac
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7732046
    Reviewed-by: Charlie Harrison <csharrison@chromium.org>
    Reviewed-by: Sophie Chang <sophiechang@chromium.org>
    Commit-Queue: Ian Wells <iwells@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1610829}
2026-05-22 16:18:04 -04:00
Claudio DeSouza 89f4eb930e [cr149] String::Substring renamed to DeprecatedSubstring
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6f8d3ab428ec002d18b29ecd18c0c124b667e87

commit c6f8d3ab428ec002d18b29ecd18c0c124b667e87
Author: Kent Tamura <tkent@chromium.org>
Date:   Thu Apr 9 01:44:49 2026 -0700

    WTF: Rename String::Substring() to DeprecatedSubstring()

    * inspector_css_parser_observer.cc:
      A DCHECK assumes `comment_text` is not empty, so `start_offset`
      should not be greater than `parsed_text_.length()`. We can use
      subview().

    Bug: 473854537
    Change-Id: Ia38b03fd58755e9370037c483bce7bfd5482343e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7740859
    Auto-Submit: Kent Tamura <tkent@chromium.org>
    Reviewed-by: Fredrik Söderquist <fs@opera.com>
    Commit-Queue: Fredrik Söderquist <fs@opera.com>
    Cr-Commit-Position: refs/heads/main@{#1612041}
2026-05-22 16:18:04 -04:00
Claudio DeSouza 794beb15af [cr149] EnterprisePolicyUrlChecker now EnterprisePolicyChecker
This change updades our checker to use the newer version and keeps a
nullified implementation for the new method added to this new class.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/75b2acce79497326ac3388f8d3e6d03a21b1459e

commit 75b2acce79497326ac3388f8d3e6d03a21b1459e
Author: Haihan Chen <haihan@google.com>
Date:   Thu Apr 9 08:57:26 2026 -0700

    [GLIC CEP Paste Support] Merge actor enterprise checks into single `EnterprisePolicyChecker` interface

    To simplify the API and avoid extra param for actor tasks for content
    policy checks specifically, since glic is the only user and implements
    both url and content checks in a single class right now
    (`glicactorpolicychecker`).

    This is a refactor, content validation usage in tools like `PageTool` in
    follow-up CL.

    Bug: 473047343
    Change-Id: I8fb9b45955ccff15c3331af445df05dfcc589ac4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7735646
    Reviewed-by: Kevin McNee <mcnee@chromium.org>
    Commit-Queue: Haihan Chen <haihan@google.com>
    Cr-Commit-Position: refs/heads/main@{#1612275}
2026-05-22 16:18:04 -04:00
Claudio DeSouza c1df6b7336 [cr149] Several actor headers moved
These are merely header inclusion path changes.

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

commit a04bd984f618f1b601d1f1eed03c79526fede1df
Author: Andrew Liu <liu@chromium.org>
Date:   Thu Apr 9 13:21:47 2026 -0700

    Move actor_features, actor_switches, and actor_util to components

    This allows cross-platform (i.e. iOS) reuse of the feature flags. This
    CL also splits out the ScreenshotIframeRedactionScope enums to clean up
    the transitive dependencies.

    Bug: b:498735476
    Link: https://chromium-review.googlesource.com/id/I34099ac7e63ab047fbe2d8afa78bde996a6a6964
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7726881
    Commit-Queue: Andrew Liu <liu@chromium.org>
    Reviewed-by: Siddhartha S <ssid@chromium.org>
    Reviewed-by: Kevin Graney <kmg@google.com>
    Cr-Commit-Position: refs/heads/main@{#1612467}
2026-05-22 16:18:03 -04:00
Claudio DeSouza cac9a404dd [cr149] kTrackingProtection3pcd deleted
This feature has been deleted with the flag, which we were disabling.

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

commit 6cecf5c9cf156340d248173d59672e41981467af
Author: Fiona Macintosh <fmacintosh@google.com>
Date:   Thu Apr 9 01:59:36 2026 -0700

    Delete kTrackingProtection3pcd feature

    Fixed: b:482352097
    Change-Id: I856bdd18a750581b6bc717652e4a531ee5cda00f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7741961
    Auto-Submit: Fiona Macintosh <fmacintosh@google.com>
    Reviewed-by: Christian Dullweber <dullweber@chromium.org>
    Commit-Queue: Christian Dullweber <dullweber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1612047}
2026-05-22 16:18:03 -04:00
Claudio DeSouza 3b0f99edcf [cr149] Rely on //chrome/browser/ui/test:dialog
This the componentisation of these files, we do not need anymore to
include these sources ourselves in `brave_browser_tests`.

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

commit e0cd9afb25e911c62c8c096ef55816bd9e3b665e
Author: Tiago Vignatti <tvignatti@igalia.com>
Date:   Thu Apr 9 07:28:31 2026 -0700

    Componentize chrome/browser/ui/test/

    This changes create chrome/browser/ui/test/BUILD.gn with dedicated
    targets for all test files in this directory, which were previously
    scattered across chrome/test/BUILD.gn and chrome/browser/ui/BUILD.gn.
    Some of the files were duplicated in multiple targets, and has now
    fixed.

    New targets:
    - :dialog — moved from //chrome/test:test_support and de-duplicated from
      browser_tests/interactive_ui_tests
    - :closed_waiter — moved from //chrome/test:test_support_ui
    - :test_support — de-duplicated and moved from browser_tests,
      interactive_ui_tests, and //chrome/browser/ui:test_support
    - :confirm_bubble — moved from //chrome/browser/ui:test_support
    - :browser_tests — browser test files
    - :interactive_ui_tests — interactive UI test files
    - :app_window — moved from //chrome/browser/ui:test_support

    Bug: 353332589
    Change-Id: I602615d0b8a96af88af82cf1caaf75a3a2184d07
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7704138
    Reviewed-by: Darryl James <dljames@chromium.org>
    Commit-Queue: Tiago Vignatti <tvignatti@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#1612208}
2026-05-22 16:18:03 -04:00
Claudio DeSouza 0e4e07ea90 [cr149] AddFakeURLToHistoryDB deleted
`history::AddFakeURLsToHistoryService` should be used instead.

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

commit b93f6d1f2368fadbd2367931cc2fbccb1abcc790
Author: Greg Thompson <grt@chromium.org>
Date:   Tue Apr 7 06:58:55 2026 -0700

    Add sequence checks to sql::Database

    Also in this change:

    - Fix a few tests that were violating the sequence requirements.
    - Remove Database::ReportMemoryUsage, which was unused.

    Bug: 40827949
    Change-Id: I1a5c4630ed150552cdf66cf5951e2111c7aa8434
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7687491
    Commit-Queue: Greg Thompson <grt@chromium.org>
    Auto-Submit: Greg Thompson <grt@chromium.org>
    Reviewed-by: Jean-Philippe Gravel <jpgravel@chromium.org>
    Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1610716}
2026-05-22 16:18:02 -04:00
Claudio DeSouza 2a75a3f8c6 [cr149] MakeOptionsFor[Set|Get] with top_frame_origin arg
This recent change requires us to fix our own overrides and callers for
these functions.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1575bebcd1c16fa1508c87eda06c5b3b1c364c3c

commit 1575bebcd1c16fa1508c87eda06c5b3b1c364c3c
Author: Duncan Mercer <mercerd@google.com>
Date:   Wed Apr 8 15:31:53 2026 -0700

    [Blink/Network] Support origin targeting for secure exemptions

    This change updates WebSecurityPolicy to support origin targeting
    for secure embedder exceptions by allowing specific origins instead
    of applying globally to an entire scheme.

    It also migrates secure cookie exemptions—specifically those affecting
    third-party cookie blocking and SameSite restrictions—in CookieManager
    and CookieSettings from scheme/host-based registration to
    url::Origin-based registration. This enables precise, unscoped
    exemptions for secure origins (such as chrome-untrusted://lens)
    without modifying the properties or behavior of the cookie origin
    itself.

    Bug: b:483614998
    Change-Id: I7fe2a00e631513c6ebcdb5fb996914f5b48a9447
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7689068
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Reviewed-by: Nidhi Jaju <nidhijaju@chromium.org>
    Reviewed-by: Dylan Cutler <dylancutler@google.com>
    Commit-Queue: Duncan Mercer <mercerd@google.com>
    Reviewed-by: Joshua Hood <jdh@chromium.org>
    Reviewed-by: Lily Chen <chlily@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1611822}
2026-05-22 16:18:02 -04:00
Claudio DeSouza 8070a2b7f7 [cr149] TranslateLanguageList with TranslateUrlFetcher arg
This change corrects several places to pass `TranslateUrlFetcher` into
`TranslateLanguageList`.

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

commit 6aef37c345ee6449713a213c04878417dd87d0c4
Author: Danilo Françoso Tedeschi <danft@google.com>
Date:   Wed Apr 8 06:26:11 2026 -0700

    Replace static DisableUpdate with dependency injection for TranslateLanguageList.

    This change removes the global static flag `update_is_disabled` from TranslateLanguageList and instead allows injecting a TranslateUrlFetcher instance. This improves testability by allowing mock fetchers to be used without relying on global state. TranslateDownloadManager now has a setter for its TranslateLanguageList.

    Change-Id: I739659aba52e95e6236e0b5d85fd9672b090c864
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7719220
    Reviewed-by: Basia Zimirska <basiaz@google.com>
    Commit-Queue: Danilo Françoso Tedeschi <danft@google.com>
    Cr-Commit-Position: refs/heads/main@{#1611437}
2026-05-22 16:18:02 -04:00
Claudio DeSouza 01294c6062 [cr149] BubbleAnchor now a type
This used to be an alias to:

```cxx
using BubbleAnchor = std::variant<std::nullptr_t, View*, ui::TrackedElement*>;
```

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1ba6a69579ba3b5f5925ff77a390be5a99d748e7

commit 1ba6a69579ba3b5f5925ff77a390be5a99d748e7
Author: Maks Orlovich <morlovich@chromium.org>
Date:   Tue Apr 7 11:33:31 2026 -0700

    Make BubbleAnchor an own class.

    The variant implementation has a property that seems very unfortunate:
    it has 3 possible places it can store nullptr, which makes it tricky to
    reason about and work with, e.g.:

    BubbleAnchor Foo() {
     if (View* view = Bar()) {
       return view;
     }
     return nullptr;
    }

    is not equivalent to: BubbleAnchor Foo() {
      return Bar();
    }

    It's also somewhat awkward to use, and can't be forward declared.

    The class wrapper normalizes the nulls. It also gives it is own
    header (and can be forward declared).

    Change-Id: I2aacb894ee995af7fd012f2762826cd30f277179
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7647509
    Reviewed-by: Dana Fried <dfried@chromium.org>
    Commit-Queue: Maks Orlovich <morlovich@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1610910}
2026-05-22 16:18:01 -04:00
Claudio DeSouza 18febcb2ed [cr149] Use ui_test_utils::FindAnyBrowser
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/ddd5ffe0ad3129bb03508ab864465e77f0e50bed
https://chromium.googlesource.com/chromium/src/+/2174233eeebf04d1a671c66f2be7b630e6117de0

commit ddd5ffe0ad3129bb03508ab864465e77f0e50bed
Author: Yu He <yhe@microsoft.com>
Date:   Wed Apr 8 12:02:16 2026 -0700

    [bedrock] Remove unused chrome::FindAnyBrowser()

    The FindAnyBrowser() function in browser_finder.h
    is unused. Its declaration already carried a warning ("Do not use this
    method"), and there are no remaining callers in the codebase.

    Remove the declaration and definition to reduce dead code.

    Bug: 494010890
    Change-Id: Iec391a4c4f9001726daf4b350fc3e3eccafe9017
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7736509
    Commit-Queue: Tom Lukaszewicz <tluk@chromium.org>
    Auto-Submit: Yu He <yhe@microsoft.com>
    Reviewed-by: Tom Lukaszewicz <tluk@chromium.org>
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1611701}

commit 2174233eeebf04d1a671c66f2be7b630e6117de0
Author: yhe <yhe@microsoft.com>
Date:   Sun Mar 29 15:57:42 2026 -0700

    [bedrock] Move FindAnyBrowser to ui_test_utils

    Migrate chrome::FindAnyBrowser() into ui_test_utils::FindAnyBrowser(),
    reimplementing it on top of GlobalBrowserCollection and
    BrowserWindowInterface instead of the legacy Browser-based APIs.

    The new helper:
    - Returns BrowserWindowInterface* (instead of Browser*).
    - Iterates browsers via GlobalBrowserCollection::ForEach() in
      activation order.
    - Skips delete-scheduled browsers.
    - On ChromeOS, excludes windows shown on another user's desktop
      via ash::MultiUserWindowManager.
    - Defaults match_original_profiles to true (most callers used true).

    Update all test call-sites to use the new function:
    - session_login_browsertest.cc
    - profile_window_browsertest.cc
    - browser_finder_chromeos_browsertest.cc
    - browser_finder_chromeos_unittest.cc
    - toolbar_view_interactive_uitest.cc

    Add the required BUILD.gn deps (//chrome/browser/ui/browser_window,
    //chrome/browser/ui/ash/multi_user, //chrome/test:test_support_ui).

    Bug: 494010890
    Change-Id: I07701d0c20514e51ead54c3367ddfbb0317735a6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7686930
    Reviewed-by: Qikai Zhong <qikaizhong@microsoft.com>
    Reviewed-by: Tom Lukaszewicz <tluk@chromium.org>
    Commit-Queue: Tom Lukaszewicz <tluk@chromium.org>
    Auto-Submit: Yu He <yhe@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1606838}
2026-05-22 16:18:01 -04:00
Claudio DeSouza 110869ed10 [cr149] SidePanelEntry::PanelType entries now in SidePanelType
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/78425c46e1229419e65b0b8485e0e5b4e405bb85

commit 78425c46e1229419e65b0b8485e0e5b4e405bb85
Author: Mohamed Adel <adelm@google.com>
Date:   Wed Apr 8 10:21:20 2026 -0700

    [Side Panel Infra] Move SidePanelEntry::PanelType into side_panel_enums

    Bug: 499977101
    Change-Id: I04e7d9559c496d59fb84731bb0f26d99fbc5afe6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7731922
    Reviewed-by: Theresa Sullivan <twellington@chromium.org>
    Auto-Submit: Moe Adel <adelm@google.com>
    Commit-Queue: Moe Adel <adelm@google.com>
    Cr-Commit-Position: refs/heads/main@{#1611625}
2026-05-22 16:18:01 -04:00
Claudio DeSouza 8f31759480 [cr149] kTpcdMetadataGrants deleted
The feature was being disabled in Brave, and now it is gone.

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

commit b7f05fafa03fe5ae3a7039fbad7dcf16198beda4
Author: Fiona Macintosh <fmacintosh@google.com>
Date:   Tue Apr 7 12:00:10 2026 -0700

    Delete TPCD metadata manager and associated 3pcd cookies logic

    Change-Id: I258499866c8714129644e219a76e4816e24f4783
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7726996
    Reviewed-by: Josh Karlin <jkarlin@chromium.org>
    Reviewed-by: Christian Dullweber <dullweber@chromium.org>
    Reviewed-by: Alex Ilin <alexilin@chromium.org>
    Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
    Reviewed-by: Maks Orlovich <morlovich@chromium.org>
    Commit-Queue: Fiona Macintosh <fmacintosh@google.com>
    Reviewed-by: Joshua Hood <jdh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1610923}
2026-05-22 16:18:01 -04:00
Claudio DeSouza 6e74e53c4e [cr149] IWYU for base/logging.h
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/57a7dfb4e2645b9c62d3a005436c815f4314b5e6
https://chromium.googlesource.com/chromium/src/+/a65d0fd3d0c70c37e7ac03bbc7389961eb69e66d

commit 57a7dfb4e2645b9c62d3a005436c815f4314b5e6
Author: Daniel Cheng <dcheng@chromium.org>
Date:   Tue Apr 7 01:29:42 2026 -0700

    Remove base/logging.h include from validation_errors.h

    This header is included in many C++ source files generated from .mojom
    and is fairly heavyweight. While moving the logging out of the headers
    is straightforward, array validation failures generate a std::string
    with some runtime details. `std::string_view` handles both cases nicely,
    but there is value in minimizing the includes in this file as much as
    possible. `const char*` and using `.c_str()` was the initial approach
    considered, but discarded as a bit too hacky after some prototyping.

    Instead, the helpers that create additional context for array validation
    failures now return a struct with details about the failure. The various
    validation error reporting functions have additional overloads that
    internally stringify the details so that validation errors are still
    reported in the exact same way.

    gemini-cli was used to quickly prototype some ideas as well as implement
    the overall CL, with some manual followups to improve naming and reduce
    duplication.

    One unintended side effect is a minor improvement in binary size, since
    the new error detail structs are trivially destructible, unlike
    std::string.

    Bug: 499476145
    Change-Id: If52b10f4928b7920ea7b120754a1798c125fefa7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7730404
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Reviewed-by: Lei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1610607}

commit a65d0fd3d0c70c37e7ac03bbc7389961eb69e66d
Author: Daniel Cheng <dcheng@chromium.org>
Date:   Tue Apr 7 01:23:35 2026 -0700

    Fix several more IWYU errors for base/logging.h

    Bug: 499476145
    Change-Id: Iba431f2c534365f9ea575c9be86bd70e8fa6a268
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7732103
    Owners-Override: Takuto Ikuta <tikuta@chromium.org>
    Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
    Reviewed-by: Kentaro Hara <haraken@chromium.org>
    Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1610606}
2026-05-22 16:18:00 -04:00
Claudio DeSouza 9e5e5102d3 [cr149] CSSSelectorFragmentAnchor feature removed
This feature was being disabled in Brave.

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

commit d57f3260469cb57abc0109976110a760d30dcfbb
Author: Andrew Paseltiner <apaseltiner@chromium.org>
Date:   Wed Apr 8 14:15:25 2026 -0700

    Remove experimental CSSSelectorFragmentAnchor feature

    The CSSSelectorFragmentAnchor feature was an experimental extension to
    fragment directives that has not seen active development in years and
    has never been officially specified. Furthermore, the implementation
    lacked certain security controls (crbug.com/497956094) discussed in the
    feature proposal
    (https://github.com/WICG/scroll-to-text-fragment/blob/main/EXTENSIONS.md#proposed-solution).

    This CL removes the implementation, including:
    - The CssSelectorFragmentAnchor and CssSelectorDirective classes.
    - The CSSSelectorFragmentAnchor runtime-enabled feature flag.
    - The -internal-selector-fragment-anchor pseudo-class.
    - Associated UA styles and metrics.

    The createSelectorDirective() JS API is preserved as it is used by the
    Text Fragments feature to generate TextDirectives. Related WPTs are
    updated to remove CssSelector specific tests while maintaining coverage
    for general directive parsing.

    Bug: 1253707, 40203851, 40203761, 497956094
    Change-Id: I2b11bdbde4475e48693f182ecca3c0bf9c79c198
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7735903
    Reviewed-by: Sebastien S-G <sebsg@chromium.org>
    Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
    Reviewed-by: Rick Byers <rbyers@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1611777}
2026-05-22 16:18:00 -04:00
Claudio DeSouza 31bd278439 [cr149] Bump resource_ids
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/012ad31d6d103d5300df5e0141c22d3d7491d123

commit 012ad31d6d103d5300df5e0141c22d3d7491d123
Author: dpapad <dpapad@chromium.org>
Date:   Mon Apr 27 20:43:30 2026 -0700

    Fix grit.exception.IdRangeOverflow: ID range overflow build error.

    Likely triggered by the file additions in https://crrev.com/c/7791019.

    Fixed: 507182397
    Change-Id: I5a7a53a80a479a8041dcfc56a6ba7297f7314d11
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7798499
    Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
    Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
    Reviewed-by: Fumitoshi Ukai <ukai@google.com>
    Cr-Commit-Position: refs/heads/main@{#1621526}
2026-05-22 16:17:59 -04:00
Claudio DeSouza ab73e83f1f [cr149] IWYU fixes. 2026-05-22 16:17:59 -04:00
Claudio DeSouza 1e4cd8fd09 [cr149] gnrt run for Chromium 149.0.7824.1. 2026-05-22 16:17:58 -04:00
Claudio DeSouza 63f95ad6d6 Conflict-resolved patches from Chromium 148.0.7778.179 to Chromium 149.0.7824.1. 2026-05-22 16:17:58 -04:00
Claudio DeSouza c9f97c1560 Apply-fixed 🩹 patches from Chromium 148.0.7778.96 to Chromium 149.0.7824.1. 2026-05-22 16:17:58 -04:00
Claudio DeSouza 2f5da17f69 Update from Chromium 148.0.7778.179 to Chromium 149.0.7827.14. 2026-05-22 16:17:58 -04:00
cdesouza-chromium ffa95ab18c [best-practices] Simple fixes to the 🩹 best practices (#36653)
This document was mentioning `plaster` keys with the wrong name.
2026-05-22 15:21:13 +01:00
cdesouza-chromium a651e03a79 [plaster] Introducing a 🩹 YAML frontend (#36651)
This PR introduces the YAML frontend for plaster that is meant to
eventually become the only frontend, once all `.toml` Plaster files are
migrated.

This change covers all places where the assumption about `.toml` files
was being used, inclusing `brockit`, and `git-cr` tools.

Most of the code that should be deleted in the future is well guarded
with comments leading back to the issue tracking, so the TOML parser can
be dropped eventually.

With this change, a dependency to `pyyaml` has been introduced. This
dependency has wheels provided by `vpython`, which is already the
expected python runtime for Plaster.

 - Rationale for this change

We have experimented at length with `.toml` files, in order to
understand some of the shortcomings they have that would be addressed
with `.yaml` files.

 * `prettier` offers YAML formatting out-of-the-box. On the other hand,
   formatters for TOML files are not easy to find, as both `prettier`
   and `vpython` have their own challanges with the current options
 * YAML's sytanx works better with codeblocks, as it doesn't require
   quoting. This makes the content seen less noisy. Looking on some of
   the migrated plasters, the YAML substitutions look more readable.
 * YAML has better sytanx highlight support in some editors.

Bug: https://github.com/brave/brave-browser/issues/55738
2026-05-22 15:20:51 +01:00