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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}