0
Commit Graph

116740 Commits

Author SHA1 Message Date
edc3cb823a Remove network::ResourceRequest from PermissionsPolicy
This is needed to break a circular dependency between the request and
the policy that would appear in an upcoming CL where the policy will be
added onto the request.

This was a hack anyway that was added when requests had no access to
permissions policies but after crrev.com/c/6320262 they will have access
to them and all functions like this should be moved to the request
object. Ideally `PermissionsPolicy` shouldn't read flags from the
request and change behavior based on them, the request object should
handle things like this. A todo bug was created for this.

Bug: 382291442
Change-Id: Idca4d34bb30cf4bc44c87695fdcf72ea623d98c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332329
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428943}
2025-03-06 08:15:17 -08:00
24d36b321a Check RFH's policy_container_host before its active_sandboxing_flags
Add a check that a frame's policy_container_host is not null before we
check the active_sandboxing_flags to prevent crashes due to a frame with
a detached parent.

Change-Id: I9246babf29ee3d22e801018fdba65c49a3dd96d2
Bug: 400901915
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6191095
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Commit-Queue: Anusha Muley <anushamuley@google.com>
Cr-Commit-Position: refs/heads/main@{#1428937}
2025-03-06 08:07:00 -08:00
218f53d616 Plumbing Private model training data from worklet to browser process.
This change passes data we get from `reportAggregateWin()` to the
browser so that it can be used to create a PMT request in a follow up
CL.

This change:
- Creates a mojom struct to carry this data over IPC
- Builds that struct using data we get from `reportAggregateWin()`
- Passes that struct from the bidder worklet to the IG auction
  reporter

This change modifies some previous tests to ensure they now validate the
private model training data that comes out of the worklet.

We also test that a struct is always built and passed when
`queueReportAggregateWin()` is called, no matter if there was an an
issue with `reportAggregateWin()` such as:
 - a error
 - timeout
 - no reportAggregateWin() function defined
 - no call to sendEncryptedTo()
 - if the payload size is greater than `payload_length`

Bug: 390160246
Change-Id: Ib3792af99a0e840209fc66288e8b4426f87a1cee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6312297
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Youssef Bourouphael <ybourouphael@google.com>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428913}
2025-03-06 07:36:09 -08:00
c3f9a2ca8d DsePreload2: Make PreloadPipelineInfo //content public
This CL is a preparation of https://crbug.com/394215571.
We need PreloadPipelineInfo in //chrome to start prefetch from DSE.

Bug: 394215571
Change-Id: Id5218b40b8aa5054d5c8d43ded499f431a7ef43b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6232385
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428912}
2025-03-06 07:35:51 -08:00
78519030ef Replace IS_CHROMEOS_ASH with IS_CHROMEOS in content.
This is part of Lacros sunset. Since Lacros is gone, the two macros
mean the same thing.

Bug: 354842935
Change-Id: Id19b54a5fca2787f3528f69b1e02ea230a10a224
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332571
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428908}
2025-03-06 07:31:08 -08:00
6226bdb9b3 Revert "[GTK] Support Emacs bindings on GTK4"
This reverts commit 50a0f5cfa8.

Reason for revert: hits a DCHECK when pressing any key https://crbug.com/400996809 

Original change's description:
> [GTK] Support Emacs bindings on GTK4
>
> This change replaces the old vector‐based API
> GetTextEditCommandsForEvent with a function that returns a single
> ui::TextEditCommand. INVALID_COMMAND is returned when no valid command
> applies. The command mapping no longer relies on heap-allocated data
> (vector and string), so can now be a compile time constant.
>
> The old code used a complex signal handling approach that simulated a
> keypress in a fake window and widget to observe the resulting text edit
> command. However, the only "key theme" GTK ever supported was emacs
> bindings before key themes were removed in GTK4. This CL simplifies the
> approach by directly mapping key events to edit commands. It also
> enables emacs bindings on GTK4 and (eventually, when this code is moved
> out of //ui/gtk since it no longer has any GTK dependencies) QT.
>
> Change-Id: If4856d33aa8ec45f2e397aa517032ddc22b63def
> Bug: None
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6314265
> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
> Reviewed-by: Jonathan Ross <jonross@chromium.org>
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1428340}

Bug: None
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I6f01261c100d6cd390a7d4e03518abd10a4053a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6333611
Commit-Queue: Osama Fathy <osamafathy@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Osama Fathy <osamafathy@google.com>
Reviewed-by: Osama Fathy <osamafathy@google.com>
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428887}
2025-03-06 06:39:51 -08:00
e154433eae Initial changes for supporting Pointer Lock API on Android
Changes:
- Add Implementation for the Lock/Unlock/Has pointer methods in rwhva,
by routing them to WindowAndroid
- Override RequestPointerLock method in web_contents_delegate_android to
 return a success status
- Implement Lock/Unlock/Has pointer in WindowAndroid & keep track of the
 view that initiated the pointer lock request
- Gate the changes behind a new feature flag 'PointerLockOnAndroid'

Known missing parts:
- Using the ExclusiveAccessManager for the user_gesture & timing related
 that need to be made before locking the pointer
- Routing the 'onPointerCaptureChange' to the native side
- Forwarding Pointer events when the pointer is captured to blink
- Displaying a Toast message when the pointer is captured
- Shortcut support 'ESC' for releasing the pointer
- Lock/Unlock pointer request tests

Bug: b:395839399
Change-Id: I76ec4fca6d8367edbc62eb9ea9dce249444e9d9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6257732
Commit-Queue: Abdelrahman Eed <abdoeed@google.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428826}
2025-03-06 03:59:08 -08:00
ff70042e41 Remove broken dependencies in InputCursorAnchorInfoComparator
The comparator was relying on Objects.equals and Arrays.deepEquals which
work until the equals and hashCode generated methods are removed. This
CL replaces those calls with custom methods to compare the properties.

Bug: 399297934
Change-Id: I4b5e5eea70b22a50b38ffb3a17c232bf7bd4123e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6330337
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428822}
2025-03-06 03:52:38 -08:00
fb55f71655 PrefetchReusable: Disable by default on Android
In https://crrev.com/c/6286446, we accidentally enabled PrefetchReusable
on Android. This CL disables it on Android.

Bug: 40064891, 397882995
Change-Id: I469e1f2a9d306218eb4cb96dbae8d6e7dc4bd33f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332833
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428809}
2025-03-06 02:54:57 -08:00
2cfb48e606 fuzzing: rewrite the ConvertsJSONToCBORCorrectly fuzzer
Since we cannot depend on the gRPC corpus anymore, it's a good idea to
start using FuzzTest so that we ensure the generated strings are valid
JSON.

The corpus is not necessary anymore because this construct guarantees
a valid JSON file.

AX-Relnotes: n/a.
Bug: 399449169
Change-Id: I065796d2f510caee4f3dc39597830209ce984e3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309142
Commit-Queue: Paul Semel <paulsemel@chromium.org>
Reviewed-by: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428800}
2025-03-06 02:07:24 -08:00
571fcd3c7e Measure elapsed time to check ServiceWorker allowed
To understand the cost to check if the ServiceWorker is allowed inside
`ServiceWorkerContainerHostForClient`, let me add a metrics for that.

Change-Id: I1aad423725e0aaaab35afd72b5ffdfa7fa0c6781
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332354
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Auto-Submit: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428752}
2025-03-05 23:01:50 -08:00
b416e8da7f Add CommitReplySent milestone to abandoned PLMO
Currently, we don't have metrics to measure the time taken by the
navigation commit in the renderer side in the abandoned page load
metrics observer. As a navigation milestone, we have `CommitReceived`
and `DidCommit`. `CommitReceived` represents the navigation commit start
time in the renderer. On the other hand, `DidCommit` is the time that
the browser received the message from the renderer. We don't have the
corresponding DidCommit milestone in the renderer side.

Thanks to crrev.com/c/6092101, now `DidCommitProvisionalLoadParams` mojo
interface has `commit_reply_sent`, which is the timestamp at which the
renderer responded to the browser's CommitNavigation IPC.

This CL adds `CommitReplySent` as a new milestone to represent the
renderer side of the nav-commit completion. After this CL, we can
measure the nav-commit time taken in the renderer by looking at the diff
between `CommitReceived` and `CommitReplySent`.

NO_IFTTT=Failed by adding the code comment

Bug: 400764485
Change-Id: I14f30d1ff59d0447678409c169029fa9a33c20bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6326574
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428738}
2025-03-05 22:02:59 -08:00
a1dd2bf360 Common header for prefetch HTTP header constants.
Move the prefetch HTTP header constants to a common header and put that header in a location accessible to all the folders that use the prefetch constants.

Additionally, apply updated constexpr constant guidance.


Bug: 40281978
Change-Id: Id6d642b4abef67faeba0772c0a23f8cc26b15730
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6249202
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Dave Risney <david.risney@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1428708}
2025-03-05 19:40:42 -08:00
44d8036a9d [tracing] Use trace thread for gpu process to initialize tracing
For non-zygote child gpu thread, start the trace thread in
ContentMainRunnerImpl() directly.

For zygote child gpu thread, start the trace thread in RunZygote after
zygote fork and featurelist init.

For Linux & ChromeOS, stop and restart the trace thread when entering
sandbox. Restarting trace thread has a caveat that delayed tasks would
will be lost unless we save them.

This is [3/?] CL of enabling tracing prior to sandboxing.

Bug: 380411640
Change-Id: I89fa94f63a709de0e3da4f8759098c9fff813bee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180639
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428704}
2025-03-05 19:33:00 -08:00
fb05429d56 [ios blink] Implement autoscroll for selection
Should start autoscroll when users drag selection handle to edge of
viewport/scrollable container.
1. Add new method StartAutoscrollForSelectionToPoint to
   AutoscrollController to scroll to point for selection.
2. Expose StartAutoscrollForSelectionToPoint and StopAutoscroll
   to Browser process
3. Call corresponding methods in autoscrollToPoint and cancelAutoscroll

Note: when users drag the right handle of selection, the point passed to
autoscrollToPoint is not the point that users touch. The Y value of the
point passed is smaller than the Y value that users touch. So, we will
use a greater gap for the bottom of belt box.

Bug: 40254930
Change-Id: I91af9cd319535a2a9683d2afd89597389b40e979
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6267941
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Fred Shih <ffred@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Xiaobin Cui <xiaobincui@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1428693}
2025-03-05 18:46:10 -08:00
ff973a9c70 Always MayReleasePrefetch on ~PrefetchDocumentManager
As a preparation for migrating `all_prefetches_` to `PrefetchHandle` in
[1], this CL changes the behavior to align with the `PrefetchHandle`
behavior, so that [1] can migrate to `PrefetchHandle` without behavior
changes.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/6325476

Bug: 390329781
Change-Id: I4a99217f194c30c6eb9c4413cc167cadc261fd33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6325474
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428626}
2025-03-05 15:51:33 -08:00
08c47d1552 Prefetch: Abort prefetch when PrefetchStreamingURLLoader is gone
There is a possibility where PrefetchStreamingURLLoader is destructed
during PrefetchService handles prefetch redirect (i.e.
PrefetchService::OnPrefetchRedirect ~
PrefetchService::OnGotEligibilityForRedirect).

This CL makes PrefetchContainer::GetStreamingURLLoader() return nullptr
when PSUL is already deleted, as well as it is schedule to be deleted.
If so, PrefetchService will abort that prefetch during redirect
handling.

Also, if the redirect is not handled in PrefetchStreamingURLLoader until
DisconnectPrefetchURLLoaderMojo is called (usually this is handled by
PrefetchService calling PrefetchStreamingURLLoader::HandleRedirect),
DisconnectPrefetchURLLoaderMojo instead handle this as a ineligible
redirect.

Bug: 396133768
Change-Id: I89c1e9320f8b8a336249308908c6561bdaf2de06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6272275
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428620}
2025-03-05 15:46:07 -08:00
bc43ccf673 WebNN: Enable in SharedWorker and ServiceWorker contexts
https://github.com/webmachinelearning/webnn/issues/804

Note that Chromium doesn't expose SharedArrayBuffer in
SharedWorker context, so tests are modified to probe
for the existence of the SAB interface, or are skipped
entirely if the test is SAB-specific.

Change-Id: Ib1662236560c26ebe79a7b0f2fe2b074ef0e0eeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6299847
Reviewed-by: Weizhong Xia <weizhong@google.com>
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Phillis Tang <phillis@chromium.org>
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428607}
2025-03-05 15:21:22 -08:00
a129d91c24 Move IsPrefetchAttemptFailedOrDiscardedInternal to PrefetchService
To migrate `PrefetchDocumentManager::all_prefetches_` to
`PrefetchHandle`, this CL moves
`IsPrefetchAttemptFailedOrDiscardedInternal` to `PrefetchService` and
make it work on `owned_prefetches_` instead of `all_prefetches_`.

Bug: 390329781
Change-Id: I35ff8bdb9f5b6c18cdaf225428f16da1dbb82702
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6325475
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428585}
2025-03-05 14:28:12 -08:00
4f459e2860 [webauthn] signalUnknownCredential hides GPM creds
Have PublicKeyCredential.signalUnknownCredential hide passkeys in GPM
instead of deleting them. This is done by setting the `hidden` property
to `true`. Follow-up CLs will use this property to skip these passkeys
on sign in UI.

Since it will be possible for sites to unhide passkeys as well, guard
the execution of this method behind a quota tracker to prevent rogue
sites from overloading sync.

Hiding passkeys is not yet enabled by default.

See go/webauthn-signal-api-prd

Bug: 399683089
Change-Id: I047c7a342e7216247ff5b6dd4f09fae9a5d4e2c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6319004
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428576}
2025-03-05 14:13:24 -08:00
6e1c5b0227 Prompt API Multimodal: Align mojo structs with IDL and proto
Use mojom better aligned with JS API IDL and opt-guide proto.
(role + content structs, not an interleaved sequence like odms mojom)
This aims to support an optimization guide impl: crrev.com/c/6311589

Bug: 385173789, 385173368
Change-Id: I8fe21473289c494e2fe8d42e17412d2498263172
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6313078
Auto-Submit: Mike Wasserman <msw@chromium.org>
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Daseul Lee <dslee@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428573}
2025-03-05 14:08:53 -08:00
0b509547c3 [A11y] Better error message for aria-hidden problems
Make sure that logs capturing the console error also get the
ancestor in the logs. When logging the elements, provide the
class name and id as well. Elements will look something like:
<div.myclass#some_id>, which will help authors find them.

Bug: none
Change-Id: I1e4acd6eaba417600bcf6a82343f90e8b2d13e04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6330418
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Mark Schillaci <mschillaci@google.com>
Cr-Commit-Position: refs/heads/main@{#1428563}
2025-03-05 13:49:16 -08:00
3c0869e80e dual-use: Add comments to make it easier to remember what each method records
Bug: 343669716
Change-Id: Ieee34a3885297547647268839c0282b9dd949c2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6330237
Reviewed-by: Svend Larsen <svend@chromium.org>
Commit-Queue: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Andrew Liu <liu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428558}
2025-03-05 13:42:57 -08:00
aa30721d4c [PWA] Suppress icon downloader errors for user installs in chrome:// url
This CL adds a flag to the ManifestIconDownloader to suppress warnings
for chrome:// urls that can be user installed, like the Password Manager
PWA. This is a preemptive move to ensure that chrome:// urls do not
write error logs to the console that potentially have the tendency to
overload the crash/ server (See linked bug for more information). The
flag is default initialized to false to prevent behavior from other
callsites from changing.

Also includes an automated test verifying this behavior.

Bug: 381069204
Change-Id: I83d405aa6a48dbf13331102962dd525ddc784dbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6324609
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Dibyajyoti Pal <dibyapal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428544}
2025-03-05 13:24:27 -08:00
094a99cd18 [BTM] Improve TimeSinceLastInteraction metric.
Fetch the last interaction timestamp from the BTM database as soon as
the user navigates to a page, so it's not affected by user activity on
that page before the next navigation.

Unfortunately, this is complicated. We start fetching the timestamp when
one navigation finishes, and then want to populate the UKM builder
object when the next navigation finishes, but we might not have the
timestamp yet. And if the "visit" wasn't short or is otherwise
ineligible, we don't want to emit the metric at all.

To solve this, we define a `AsyncMetricsState` class that can store the
two pieces of state we need. To keep ownership simple, instances are
always owned by `BtmShortVisitObserver`, though this means that pending
visits just get dropped if the BtmShortVisitObserver is deleted (i.e.
the tab is closed) before we get the timestamps for them.

Bug: 400503247
Change-Id: I938b0773b8626f2388b4a10098ed2c2a430f874c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6328379
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Svend Larsen <svend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428533}
2025-03-05 13:02:06 -08:00
1b49733234 Match Android event with Chrome event IMAGE_ANNOTATION_CHANGED
Currently we have Chrome events that never match with Android events.
This CL adds support to the following Chrome events:
IMAGE_ANNOTATION_CHANGED fires CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION

AX-Relnotes: N/A
Bug: 385139347
Change-Id: I57f42c61e309acf97e85caad00c32497ac989cdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6318179
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Ricky Yang <rickyyang@google.com>
Cr-Commit-Position: refs/heads/main@{#1428528}
2025-03-05 12:57:08 -08:00
ee782346ac [Protected Audience] Wire up devtools to KVv2 cache path.
This CL introduces an AuctionDownloader::NetworkEventsDelegate that
wires up almost all devtools hooks needed for PA network requires to
both appear in devtools, and to support devtools configurations that can
affect them.

The helper is only used by TrustedSignalsFetcher, for now. It also
provides a static helper method that's used by AuctionURLLoaderProxy,
to avoid having multiple copies of the logic.

Bug: 330322161
Change-Id: I56e7278fb8844968e16e2c67ddf45628f704b062
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6310822
Commit-Queue: mmenke <mmenke@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428506}
2025-03-05 12:33:11 -08:00
9aa95a9b6d Prefetch: Add a regression test that prefetch queue get stuck
This CL adds a regression test where PrefetchService::prefetch_queue_ is
not empty and PrefetchService::active_prefetch_ is std::nullopt, but no
additional prefetch is started.

Bug: 400233773, 390329781
Change-Id: Iaf4865c9aad60305d2c3c07da1c921a559c0e825
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6310958
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428475}
2025-03-05 11:35:04 -08:00
685a07f156 Disabling GetBoundsRectIframesForColorPicker test on Fuchsia
The test `GetBoundsRectIframesForColorPicker` is consistently failing on
Fuchsia
https://ci.chromium.org/ui/p/chromium/builders/ci/fuchsia-x64-cast-receiver-rel/21196/overview.
This CL adds Fuchsia to the group of OS in which
`GetBoundsRectIframesForColorPicker` should not run. This test is
similar to `ControlsIdsForDateTimePopup` as both are checking that the
bounds of the popup area and both need to run in non-headless mode in
order to pass.

Bug: 399976873
Change-Id: If58cb6bda6d0151233974be5247445c66ae484fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6324603
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Commit-Queue: Ana Sollano Kim <ansollan@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1428469}
2025-03-05 11:30:28 -08:00
2337be8ab7 [Protected Audience] Centralize UA header override logic.
There were three copies of the code to get the User-Agent header
override given a FrameTreeNode. This CL adds a utility function to
handle that, in preparation to add yet another consumer.

Bug: None
Change-Id: Iccd406074ac5d75f1d57879d7d8585bbaf28290f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6329697
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428443}
2025-03-05 10:43:15 -08:00
784ba7033e user_agent_utils: Remove GetReducedUserAgent()
Its functionality is duplicated by GetUserAgent() these days, but we
could not use the latter while this component depended on //content.

Now that this is no longer an issue, remove the last call to
GetReducedUserAgent(), which also allows removing
GetMajorVersionNumber() from PrefetchServiceDelegate. All overrides had
the same implementation, and GetUserAgent() achieves the same thing
without requiring a version number to be passed.

Bug: 389970327
Change-Id: If7b7946d92eb78b9ff0983ded22699b968d1682e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6244462
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Raphael Kubo da Costa <kubo@igalia.com>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Max Curran <curranmax@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428427}
2025-03-05 10:21:51 -08:00
4eee907633 Replace equals with static comparator for InputCursorAnchorInfo structs
This is prerequisite to reverting https://crrev.com/c/6275565

Bug: 399297934
Change-Id: I475e8af93bd7c6b5123953f4b578192b34ac1e48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6322027
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Auto-Submit: Alex Mitra <alexmitra@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428414}
2025-03-05 10:08:08 -08:00
6a579fd936 btm: Merge content/browser/btm/BUILD.ng into content/test/BUILD.gn
This builds upon https://crrev.com/c/6312237 by completely doing away
with btm's own BUILD.gn. It existed only to define its unit tests, which
is not what other directories do in //content.

Doing so also allows us to get rid of the golden_dbs_bundle_data target,
which is likely a remnant of when this code was in //chrome. The content
layer uses a .filelist file to track files that need to be added to a
bundle, so we were originally setting those files in the
golden_dbs_bundle_data target as well as the content_test_bundle_data
one, which led to `gn gen` failures.

Instead of playing with the .filelist and the .globlist based on what is
specified in golden_dbs_bundle_data, switch to solely using the
.filelist all other code also does.

Bug: 399868999
Change-Id: I1af22d523cc42749d071ed8156e89a726ae07508
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6318359
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Raphael Kubo da Costa <kubo@igalia.com>
Reviewed-by: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428411}
2025-03-05 10:05:04 -08:00
f0ffa8f6c4 fuzzing: rewrite FirstPartySetFuzzer to avoid gRPC dependency
Since we cannot depend on the gRPC corpus anymore, it's a good idea to
start using FuzzTest so that we ensure the generated strings are valid
JSON.

Here, we're using a particular domain that'll both create valid and
invalid JSON. This actually mimics the old corpus, because at every
fuzzer start, we are feeding the string mutator with a valid JSON.
This helps go deeper with a simple string mutator, while still testing
for invalid cases.

Bug: 399449169
Change-Id: I2e81d87323728b933a28fd84de95cb86a63281e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6308902
Commit-Queue: Paul Semel <paulsemel@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428401}
2025-03-05 09:50:32 -08:00
2fc315fd20 Add support for https test server in android
Move https_test_server logic from InProcessBrowserTest to
BrowserTestBase to be used by android tests as well.

Change-Id: I4e7c05c3f7f233afc5b131d57b8c1050c1f3a35c
Bug: 41482548
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6315364
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428382}
2025-03-05 09:19:22 -08:00
4e0c37342e [Partitioned Popins] Skip recording popup heuristics for popins
We should not record storage access grants for popins as they count as
embedded content for the purpose of storage access grants.

Bug: 340606651
Change-Id: I461a5da705c0edc0db9e17be65654d4dc36ab822
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6325430
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ryan Tarpine <rtarpine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428355}
2025-03-05 08:38:38 -08:00
f2b66a9dd9 [A11y] Consistent tree after aria-owns changes
This fixes https://kunskapsguiden.se and a number of other sites using
components that have an "interesting" mix of dynamic aria-hidden,
aria-owns and role changes. Simply loading the site in a debug
build shows the issue. It started crashing worse recently --
BlinkAXTreeSource::ChildAt() has a check that became fatal
starting in milestone 127.

Was not able to create a simplified test case.

Fixed: 377975067
Change-Id: I72cf3f731ab75284a76db142a6f470cb5ccc7f2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6320067
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Alison Maher <almaher@microsoft.com>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428349}
2025-03-05 08:31:11 -08:00
50a0f5cfa8 [GTK] Support Emacs bindings on GTK4
This change replaces the old vector‐based API
GetTextEditCommandsForEvent with a function that returns a single
ui::TextEditCommand. INVALID_COMMAND is returned when no valid command
applies. The command mapping no longer relies on heap-allocated data
(vector and string), so can now be a compile time constant.

The old code used a complex signal handling approach that simulated a
keypress in a fake window and widget to observe the resulting text edit
command. However, the only "key theme" GTK ever supported was emacs
bindings before key themes were removed in GTK4. This CL simplifies the
approach by directly mapping key events to edit commands. It also
enables emacs bindings on GTK4 and (eventually, when this code is moved
out of //ui/gtk since it no longer has any GTK dependencies) QT.

Change-Id: If4856d33aa8ec45f2e397aa517032ddc22b63def
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6314265
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428340}
2025-03-05 08:10:35 -08:00
6659fee2fc [DC] Support reading the protocol from lower layers of DC API
Chrome doesn't yet support multiple requests of multiple protocols in
the DC presentation API. Therefore, Chrome is forwarding only the first
request to the and caching the protocol of that request to attach back
to the response.

In order to support multiple-requests, Chrome should instead read the
protocol from the digital wallet response.

Unfortunately, digital wallets weren't adding the protocol in the
response to Chrome, and hence Chrome cannot always read the protocol
from that response.

This CL adds the infrastructure to return the response from the lowest
layers interacting with the Android platform API to upper layer. In the
upper layer, if a protocol is returned, it is preferred, otherwise, it
fallbacks to the request computed in Chrome.

This CL should be no-op since the lowest layers are hardcoded to return
an empty protocol and hence Chrome always fallbacks to the cached
protocol maintaining the same behaviour as today.

The long term plan is remove such backward compatibly logic when the
Android API are official and out of the alpha phase.

Low-Coverage-Reason: pure refactoring CL
Bug: 336329411
Change-Id: I20b57d78b19603e87a0582db93f523ca649772bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6285928
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428305}
2025-03-05 07:03:38 -08:00
f3be2c7f26 [Partition Key] Add cross site ancestor bit to devtools network handler.
Update the cookie dictionary in the devtools network handler to include
the cross-site ancestor bit in the partition key

Bug: 400944050
Change-Id: I81f1ad72302d7137f8d1fb02325c49d9d2bcfac0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6322669
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Aaron Selya <selya@google.com>
Cr-Commit-Position: refs/heads/main@{#1428302}
2025-03-05 06:57:21 -08:00
f0f0d8addd Revert "Enable BFCache for CCNS by default"
This reverts commit f9061125ef.

Reason for revert:
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5740689414422528

Sample build with failed test: https://ci.chromium.org/b/8721337446925792561
Affected test(s):
[ninja://android_webview/test:webview_instrumentation_test_apk/org.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest#testReloadingUrlDoesNotBreakBackForwardList](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fandroid_webview%2Ftest:webview_instrumentation_test_apk%2Forg.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest%23testReloadingUrlDoesNotBreakBackForwardList?q=VHash%3A05564aaacf7462e3)
[ninja://android_webview/test:webview_instrumentation_test_apk/org.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest#testReloadingUrlDoesNotBreakBackForwardList](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fandroid_webview%2Ftest:webview_instrumentation_test_apk%2Forg.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest%23testReloadingUrlDoesNotBreakBackForwardList?q=VHash%3A81248e7bbc4ea61d)
[ninja://android_webview/test:webview_instrumentation_test_apk/org.chromium.android_webview.test.LoadUrlTest#testRendererNavigationAndGoBackWithExtraHeaders](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fandroid_webview%2Ftest:webview_instrumentation_test_apk%2Forg.chromium.android_webview.test.LoadUrlTest%23testRendererNavigationAndGoBackWithExtraHeaders?q=VHash%3A05564aaacf7462e3)
[ninja://android_webview/test:webview_instrumentation_test_apk/org.chromium.android_webview.test.LoadUrlTest#testRendererNavigationAndGoBackWithExtraHeaders](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fandroid_webview%2Ftest:webview_instrumentation_test_apk%2Forg.chromium.android_webview.test.LoadUrlTest%23testRendererNavigationAndGoBackWithExtraHeaders?q=VHash%3A81248e7bbc4ea61d)

If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5740689414422528&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F6309859&type=BUG

Original change's description:
> Enable BFCache for CCNS by default
>
> According to the ramp up plan, we will launch this feature on Mar 11.
>
> This CL also updates the back_forward_cache_no_store_browsertest.cc:
> - for the previous main frame/sub frame test
> (BackForwardCacheBrowserTestNoTestingConfig after
> http://crrev.com/c/4943313) will explicitly disable BFCache for CCNS
> since it's testing that behaviour.
>
> - for
> BackForwardCacheWithJsNetworkRequestReceivingCCNSResourceBrowserTest,
> update the logic and comment to make sure that the CCNS page will be
> evicted only when the same-origin JS network happens, and they will be
> reported together.
>
> This CL also rename the feature name for
> `kJsNetworkRequestReceivedCacheControlNoStoreResource` to
> `js-network-request-received-cache-control-no-store` so it's different
> from the name with CCNS itself. This makes the reason field in the not
> restore reason API more meaningful.
>
> Bug: 40189625
> Change-Id: I85692053a46a56b998b65164d7e4df3dfc118ec0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309859
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Fergal Daly <fergal@chromium.org>
> Commit-Queue: Mingyu Lei <leimy@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1427608}
>

Bug: 40189625
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ice26d66d90de284890f66a3ddf3f4e2a224803d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6323366
Reviewed-by: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Owners-Override: Mingyu Lei <leimy@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428247}
2025-03-05 04:22:06 -08:00
1150a14933 Revert "Rebaseline android select appearance test"
This reverts commit 0196b934a3.

Reason for revert:
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/4843023482486784

Sample build with failed test: https://ci.chromium.org/b/8721283644172105873
Affected test(s):
[ninja://content/test:content_browsertests/FormControlsBrowserTest.Select](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fcontent%2Ftest:content_browsertests%2FFormControlsBrowserTest.Select?q=VHash%3A215c410e49fc7886)

If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F4843023482486784&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F6310887&type=BUG

Original change's description:
> Rebaseline android select appearance test
>
> It failed - this just rebaselines it.
>
> Fixed: 397829417
> Change-Id: I0707ad46217f2dfd7c244b29c36fe1bd477da68d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6310887
> Auto-Submit: Mason Freed <masonf@chromium.org>
> Commit-Queue: Mason Freed <masonf@chromium.org>
> Reviewed-by: Traian Captan <tcaptan@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1428018}
>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ib37b446d5c2a71fde55348c91d0a145efbbf0db4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6324786
Owners-Override: Mingyu Lei <leimy@chromium.org>
Commit-Queue: Ashley Newson <ashleynewson@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Ashley Newson <ashleynewson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428220}
2025-03-05 02:56:20 -08:00
77d1236021 Remove stale pixel expectations
Autogenerated CL from running:

//content/test/gpu/unexpected_pass_finder.py --project chrome-unexpected-pass-data --include-internal-builders --remove-stale-expectations --narrow-semi-stale-expectation-scope --num-samples 300 --suite pixel

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Fixed: 389654097, 395060191
Change-Id: I5a9c82491e63f90052d6042ccba7f6cfb9ab25c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6326362
Auto-Submit: chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com <chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1428166}
2025-03-04 23:47:37 -08:00
cb54d6bdd9 Boost RendererMain thread priority if an input scenario is detected
This feature is behind a flag kInputScenarioPriorityBoost for
experiments. If enabled, the default thread type of RendererMain will
be reduced to kDefault and boost to kDisplayCritical during typing.

Bug: 365586676
Change-Id: Icf235ea6a035b793f1b6aebb3b804d7ca56f0d08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6308410
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Jiahe Zhang <jiahe.zhang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1428165}
2025-03-04 23:41:20 -08:00
5a0ab1ac3d Remove stale context_lost expectations
Autogenerated CL from running:

//content/test/gpu/unexpected_pass_finder.py --project chrome-unexpected-pass-data --include-internal-builders --remove-stale-expectations --narrow-semi-stale-expectation-scope --num-samples 300 --suite context_lost

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Fixed: 395919013
Change-Id: I9adaa121f265c97c07cffbd417473f8667ebec41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6325836
Auto-Submit: chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com <chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1428163}
2025-03-04 23:35:24 -08:00
7cafef79b7 Finalize Navigation Confidence for Primary Main Frame only
Ensure the confidence is only updated for the primary main frame, and
not prerender/bfcached pages.

Bug: 400335353
Change-Id: I943b6a1162dc4e47829e62791710fcca946a085c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6324469
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1428148}
2025-03-04 22:01:28 -08:00
1847c40afe Prefetch: Remove staled comment of PrefetchService::owned_prefetches_
Today all `PrefetchContainer`s will be added to
PrefetchService::owned_prefetches_ once
PrefetchService::AddPrefetchContainer =>
PrefetchService::AddPrefetchContainerWithoutStartingPrefetch is called.

Bug: n/a
Change-Id: I4558bb431c32c2a71d9dfffadbfe28d0ba59fd7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6312156
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428033}
2025-03-04 15:51:09 -08:00
0196b934a3 Rebaseline android select appearance test
It failed - this just rebaselines it.

Fixed: 397829417
Change-Id: I0707ad46217f2dfd7c244b29c36fe1bd477da68d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6310887
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Traian Captan <tcaptan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428018}
2025-03-04 15:19:21 -08:00
e51e2f26ef Return scoped_refptr from PrefetchNetworkContext::GetURLLoaderFactory()
This CL makes `PrefetchNetworkContext::GetURLLoaderFactory()` return
`scoped_refptr<network::SharedURLLoaderFactory>` instead of a raw
pointer, to allow the factory plumbed across tasks asynchronously without passing raw pointers. After https://chromium-review.googlesource.com/c/chromium/src/+/6228199, the URLLoaderFactory can be used after asynchronous ServiceWorker check.

Alternatively, we could call `PrefetchNetworkContext::GetURLLoaderFactory()` when the factory is needed (after ServiceWorker check), but instead we first call `GetURLLoaderFactory()` and then plumb the `scoped_refptr<network::SharedURLLoaderFactory>` asynchronously, to decouple the user of the factory (in `PrefetchStreamingURLLoader`) from its original owner (`PrefetchNetworkContext`).
https://docs.google.com/document/d/1kbs8YJuh93F_K6JqW84YSsjVWcAeU41Mj9nwPr6IXRs/edit?tab=t.0#bookmark=id.kohs7htfumek

This (and the subsequent CL) might extend the lifetime of the returned
URLLoaderFactory a little, but probably it's OK because the
URLLoaderFactory still doesn't outlive `PrefetchStreamingURLLoader`.

Bug: 40947546
Change-Id: I51fc017c9723760fe43881710574dfea3a0dc129
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6177744
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1428015}
2025-03-04 15:14:38 -08:00
57c6b11bc6 Migrate views::Background factory methods to ColorVariant
Bug: b:400775304
Change-Id: I3b74afd8ad610beca5aa646b3d693ccfdc3a20b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6313744
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Zoraiz Naeem <zoraiznaeem@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427993}
2025-03-04 14:33:52 -08:00