It's been seen in local traces that snapshot compression is expensive,
and might compete with foreground work. THere are several experiments in
progress to tackle that, for instance by lowering priority. Add a
histogram to assess how much the lower priority impacts compression
times.
Bug: 369986099
Change-Id: I3741109ac2052117c4516a4f58bcee0f606a159c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6281949
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422480}
PreloadingDeciderTest.UmaRecallStats checks TruePositives and
FalseNegatives on navigation. Before this CL, the test didn't wait for
UMA to be recorded, hence TruePositive and FalseNegative were 0. But we
should wait for UMA. This CL adds a waiting logic for UMA, and checks
TruePositives and FalseNegatives correctly.
This CL is a preparation CL for an upcoming
feature (https://crbug.com/396998476).
Bug: 396998476
Change-Id: If4e5502a22cad87db62412ef6ce704d9edb21cb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6284766
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422418}
Previously, the permission request callback used base::Unretained(this).
This assumed that the GeolocationServiceImpl would always outlive the
permission request. However, if the owning RenderFrameHost is destroyed
before the permission request completes, the callback would be invoked
on a destroyed GeolocationServiceImpl instance, leading to a crash.
To fix this, this CL replaces base::Unretained(this) with
weak_factory_.GetWeakPtr(). This ensures that the callback is only
executed if the GeolocationServiceImpl instance is still valid. If the
instance has been destroyed, the WeakPtr will become invalid, and the
callback will be safely skipped.
Bug: 396303129
Change-Id: Ic2a71bce5eb90f04957e1d85e8f31b824c93ad93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6266168
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Alvin Ji <alvinji@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422352}
On MacOS the `base::DIR_EXE` is not the same as "root_build_dir". Need
to account for this in `GetDataResourceBytesOnWorkerThreadFromDisk()` to
resolve file paths correctly.
Unfortunately LoadWebUIFromDiskTest.FilepathInfoExists which is only run
manually, doesn't catch this (passes both with and without this fix)
since the content_browsertests binary location is different than the
main binary on MacOS.
Fixed: 397619885
Change-Id: I08e6c906076fa9e5b0699f184e9dd9e23e280f79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282306
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422271}
This is a speculative fix for an issue in Edge where Compositor Frames
are submitted with surface ranges that have invalid local_surface_id's.
The issue started due to change:5348259.
The hypothesis is that if TakeScopedKeepSurfaceAliveCallback is called
with an invalid local_surface_id_, the LayerTreeHost will still register
the associated surface range. However, the CopyOutputRequest will not be
fulfilled because CopyFromCompositingSurfaceInternal will early out if
the local_surface_id_ is invalid. Therefore, the SurfaceRange is added
to the commit state but never removed. When it's time for
SubmitCompositorFrame, an invalid SurfaceRange can be present in the
list.
In order to fix this issue, check whether the local surface is valid for
copy before calling TakeScopedKeepSurfaceAliveCallback.
Bug: 40276723
Change-Id: I6d2591ed0ee98ba0414887ea7611d640788d607b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6216395
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Shubham Gupta <shubham.gupta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422253}
A terminated Device Bound Session Credentials session can lead to
authorization changes similar to the way an expired cookie can. This CL
adds a new BFCache CacheControlNoStoreLevel for this, which will evict a
page from the cache if a DBSC session is terminated.
Bug: 353774923
Change-Id: I48e2daddb33d1102b5ccaf946eb0c541b5a07cda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6198936
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422196}
This CL lands the first prototype solution behind a new flag
kDropInputEventsWhilePaintHolding. The solution is to start the
InputRouter in an inactive state for any user-visible top frame while
paint-holding is active.
We still have quite a few test failures if we enable this feature. We
will fix them through follow-up CLs.
Bug: 40057499
Change-Id: Id98c27ac635fe6a71f4f84b50e1b2e7acc9fe1bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6085077
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422193}
To record all or specific histogram on threshold.
This has a few advantages over CustomEventRecorder
- Supports perfetto config coming from field tracing
- Supports thresholds
- Supports multiple sessions
- Doesn't rely on chrome_config string
Change-Id: I05287bd98901056c6a2b4cd46b97772dd8493d45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6254221
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422191}
This is achieved by plumbing through a PreHandleMouseEvent method
through render widget classes akin to the existing
PreHandleKeyboardEvent method, as after discussion with kerenzhu@ this
behavior was not otherwise supported.
Bug: 394367683
Change-Id: Id932cbcfca3e75a3f223b365a548cf5430c824cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6266792
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Emily Shack <emshack@chromium.org>
Reviewed-by: Jan Keitel <jkeitel@google.com>
Cr-Commit-Position: refs/heads/main@{#1422150}
This change splits out Freetype and Fontations codepaths, previously
combined under the Internal experimental param, into their own params.
This will allow varying between the 3 typeface types in an A/B
performance experiment.
Bug: 395924057
Change-Id: I5acfcca5691b0aaf93d26895da2fa1da702b0b85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6279725
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422139}
This CL is part of the investigation into replacing
DroppedFrameCounter UKMs with FrameSequenceMetrics.
Details about DFC metrics and why they are redundant
can be found in go/chrome-cc-metrics-refactor.
New Metric Doc: go/chrome-graphics-fsm-as-ukm
Why is this CL so complicated? Approach explained
here: go/chrome-cc-pdf4-as-ukm-why
Bug: 338977417, 395868899
Change-Id: I2a4f222088881f8e58b61b6d55144f91466f808a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187722
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Stacy Gaikovaia <gaiko@google.com>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422117}
...to generateBid() and scoreAd(), to tell whether fDO sampling is
enabled. The new signal is behind a flag, and only available when the
flag is enabled. It's always set to false for now even when it's
available.
Bug: 391877228
Change-Id: I0e8bcf1c4dc9bed5110fb9c48427d1f3526cb162
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6265086
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422110}
This CL does the following:
1. Adds disconnect handlers to
RenderInputRouterDelegate/RenderInputRouterDelegateClient mojo
interfaces between browser and GPU process to allow re-establishing
these mojo connections when GPU crashes.
2. Modifies RenderInputRouterClient mojo connection setup between
Viz-Renderer process. Moves RenderInputRouterClient mojo endpoint
creation to the renderer. Browser forwards the PendingRemote to Viz
using CreateCompositorFrameSink message. This takes care of GPU
restarts since renderer requests creation of framesink when GPU
crashes.
Bug: b:394865365
Change-Id: I12aca02dab000f9256aaf5337822174fbf87626c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6252837
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Auto-Submit: Aman Verma <amanvr@google.com>
Commit-Queue: Aman Verma <amanvr@google.com>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422079}
A service key is generated by `cdm_type`, `browser_context` and `site`
in content/browser/media/service_factory.cc. A registered CDM's
`cdm_type` will always be a unique non-empty value
(i.e. `kMediaFoundationWidevineCdmType`). However, when determining a
key systems capabilities, the actual CdmType which corresponds to a Cdm
is not used and a default CdmType is used instead. When more than one
media foundation cdm is registered, this leads to non-unique
ServiceKey's in service_factory.cc when creating the media foundation
utility processes which causes different CDM's to use the same utility
process and fails when attempting to retrieve the remote media
foundation service.
Taking CdmType into consideration when querying for key system
capabilities addresses the problem.
Bug: 394906654
Change-Id: Ie135caf8c06500cf1161ae5c4c1cc687347ba490
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6265506
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Sangbaek Park <sangbaekpark@chromium.org>
Commit-Queue: Piet Schouten <Piet.Schouten@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1422064}
This change implements an experiment to preload the database prior to
opening any file handles. This resolves a conflict with Windows
exclusive file mode, which was being blocked by base::PreRead's separate
handle used for preloading.
All Databases for which the owner calls Database::Preload() are included
in the study.
This CL implements an experimental feature to preload the database
before any handles are opened.
Bug: 40904059
Change-Id: Ice9dcf730f71f5e4a6af6fd2290b9588a7e0a03a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6269958
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Sophie Chang <sophiechang@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422031}
Also make it take uint8_ts rather than chars, since it's dealing with
binary data.
Additionally, introduce a HasGZipHeader() helper, which is what all
but one of its consumers actually want, and migrate consumers to the
new helper.
Bug: 40284755
Change-Id: Icb36a225752e8c56eace06f6e1e4d46c95e45339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6253892
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421987}
This header is very widely included, and this generated header is
enormous (about 18k LOC). This is estimated to trim about 367 MB off
Chrome's preprocessed source size (0.09%).
Bug: 40318405
Change-Id: Ifa359110c22385715cf307618d57a9bf095abc85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6266087
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Owners-Override: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421986}
Context: go/web-smart-card-usage-tracking
This introduces a new Mojo interface SmartCardConnectionWatcher and adds
it as an optional argument for the Connect(). When it's passed to the
platform-specific PC/SC implementation, it'll be used to inform:
- Platform implementation - of the grant expiry
- Browser - about the card usage, enabling to show indicator and impose
user attention requirements
For now this does nothing except incrementing timestamps and setting
when there's any active connection - this CL is separate due to its
size. Future work:
- Add grant expiry based on this
- Show indicator when grants are in use
Bug: 389631854
Change-Id: Ia8f226d514ba973f56231eb683aa76e282c98560
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6213591
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Simon Hangl <simonha@google.com>
Commit-Queue: Luke Klimek <zgroza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421897}
This commit changes the error page for 404 error in IWAs. Previously, it
was generic "This <bundle_id> page can't be found", and now it's the
custom IWA page for errors saying "The page you requested could not be
found in the application".
Bug: 388833752
Change-Id: Ia3d0c3b3e67c20e2b4cf52b3f1862ad15e65af22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6185412
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Patryk Chodur <pchodur@google.com>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421839}
This is a workaround to avoid a crash filed for the Chrome extension.
A window can be an extension ServiceWorker client, and in such a case,
if `Clients.matchAll()` is called, it hits DCHECK() because we assume
the client is within the ServiceWorker's origin.
I assume a window is usually an arbitrary web page, and it may not be
the same origin with the extension ServiceWorker script origin.
Therefore, it might be fine to allow them the different origin.
To preserve the existing behavior while avoiding the crash, let me
simply allow `matchAll()` to ignore the case.
Note:
I have added UMA to check what is actually become a client for the
extensions to decide if we can implement an early return (i.e.
`matchAll()` will always return an empty list) for extensions.
Bug: 396502398
Change-Id: Iff4179821a9388c40efdc947090cde60220cc8d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6277969
Auto-Submit: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421753}
Adds GPU CI and try testers for Windows and Linux AMD RX 7600 machines.
These do not currently run any actual tests. Tests will be enabled in
follow-up CLs.
Bug: 396611134, 396611135
Change-Id: I10310204131f923a05663e8671deabec5bd79e4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6270945
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421666}
setFieldRequired API was introduced in AndroidX. This CL passes this
boolean info from Clank to Android a11y node.
Remove the "required" state from state description since the new API
will be used to indicate this status. Also remove the string for this
state since it's no longer needed.
Consumed the same API in TalkBack, verified working locally. See
screen recording: comment2 of ticket below.
AX-Relnotes: N/A
Bug: 395975812
Change-Id: I0f90817b922c3c294d86d006dd8eac49fe44ac64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6263055
Commit-Queue: Wenyu Zhang <zhangwenyu@google.com>
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Cr-Commit-Position: refs/heads/main@{#1421641}
Why: this helps to understand web locks adoptions.
What:
- When a worklet is destroyed, record whether navigator.locks was
requested.
- When an update method is triggered (for individual method and for
batchUpdate() separately), record whether the 'withLock' option is
specified.
Bug: 373899210
Change-Id: I3ce97533345393c833b2861794bc52aad83573f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6277481
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421614}
CustomizableSelect and InputClosesSelect are going to be enabled via
finch so they need these configs.
Adding these flags to fieldtrial_testing_config also means that more
tests will start running with these flags enabled, so this patch does
some rebaselining of accessibility tests.
Bug: 384959329
Change-Id: Ia1361383256d8e845c18fcfd8f70b03da852f75a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6253671
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421602}