0
Commit Graph

116428 Commits

Author SHA1 Message Date
bad6998578 Fix kFledgeUseKVv2SignalsCache feature name string.
The feature name was "kFledgeUseKVv2SignalsCache" instead of
"FledgeUseKVv2SignalsCache". Too much copy-paste. :(

Bug: None
Change-Id: If91df41c77e31af42baee8c243344f944292aff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282330
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422217}
2025-02-19 14:50:30 -08:00
6bb1cf26eb Clickiness: Add viewAndClickCountsProviders IG field
Bug: 394108643
Change-Id: I4e7b3c66c03935d62f1f320552935683323754a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6248184
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422203}
2025-02-19 14:17:03 -08:00
03e719955f Add new BFCache level for terminated DBSC sessions
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}
2025-02-19 14:03:30 -08:00
917cd517d1 Drop input events in the browser until the renderer produces content.
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}
2025-02-19 13:59:55 -08:00
60dfd767e5 [tracing] Implement HistogramDataSource
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}
2025-02-19 13:57:50 -08:00
384985fdb0 WebUI: Fix ESLint @typescript-eslint/no-unnecessary-type-assertion errors, part 3.
Check in the remaining fixes for chrome.

Bug: 393525665
Change-Id: I0289b733bbfbbcdb8448e9ab19372fccd201978b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6279072
Commit-Queue: Teresa Mao <temao@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422177}
2025-02-19 13:35:05 -08:00
3813697547 [SxS] Enable click to activate inactive WebContents
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}
2025-02-19 12:49:19 -08:00
40abd7f4f4 Allow choosing freetype or fontations in FontDataManager
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}
2025-02-19 12:21:30 -08:00
3afc2b2f86 Feature Policy move from blink to network: generated features
This is in preparation of moving the file out of Blink to the Network
service.

Bug: 382291442,356624805
Change-Id: Id2897594a0c61e5cfe4436d8a34b0590937c7925
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282526
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422136}
2025-02-19 12:16:48 -08:00
b3deb703f9 Allocate SharedMemoryMapping for DroppedFrames UKM.
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}
2025-02-19 11:48:01 -08:00
6fcd97e0dc Add browserSignals.forDebuggingOnlySampling
...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}
2025-02-19 11:37:11 -08:00
647ad46d95 [Fuchsia] Remove dependency on devtools-frontend
Devtools frontend is not supported on Fuchsia. Remove dependencies
on the corresponding resources.

Bug: 396724495
Change-Id: I5b31e5d0cf96af849b4070b6786472f75a1a7568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6278810
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422107}
2025-02-19 11:34:33 -08:00
44335c7b5a [InputVizard] Reset mojo connections on GPU restarts.
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}
2025-02-19 10:43:57 -08:00
d5ca067e2e media: Use the actual cdm type when querying a key systems capabilities.
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}
2025-02-19 10:22:19 -08:00
07d5cc369d Migrate Execute to no longer support trailing whitespaces
see: section SQL style
  https://source.chromium.org/chromium/chromium/src/+/main:sql/README.md

Bug: 394891084
Change-Id: Id5e266546b8ef34292abbf12c8b9978fdfc37c01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6234519
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422032}
2025-02-19 09:42:06 -08:00
b3fd806db7 Implement experimental database pre-open preloading
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}
2025-02-19 09:41:16 -08:00
f5aaa19a48 Spanify GzipHeader.
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}
2025-02-19 08:45:50 -08:00
df5aeb4ade Forward-declare chrome_track_event.pbzero.h definitions in RenderProcessHost.
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}
2025-02-19 08:44:57 -08:00
5cccc376fe [tracing] Add a global trace thread for PerfettoTracedProcess
This allows tracing to be logged before ThreadPoolInstance is Set for
child process.

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

Bug: 380411640
Change-Id: I3e0a976d0e8f316d275eca8a6ab7cee2f546fd7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180638
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421972}
2025-02-19 08:14:01 -08:00
177a40fac9 Don't use anonymous namespaces in the sms_fetcher.h header
Anonymous namespaces must not be used in header files. Move OriginList
into the class, and adjust users of it.

Bug: none
Change-Id: I56ac99f67e1c661809cc99c4de2f1ac7a65a69d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6278322
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421950}
2025-02-19 07:36:17 -08:00
288960ba66 SmartCard: Add watcher for tracking smart card connections/usage
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}
2025-02-19 05:43:22 -08:00
c004566b2f PrefetchNewWaitLoop: Make it default enabled
Bug: 353490734
Change-Id: Id4f4128c053700dc691c283668c4d06198f3e55f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6275103
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421879}
2025-02-19 04:25:31 -08:00
7cdc652cc6 Show custom IWA page for 404 errors
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}
2025-02-19 01:57:49 -08:00
ca5ffc6416 Update Storage Owners
Add leimy@chromium.org to storage OWNERS files, this changes the same
set of files as http://crrev.com/c/6158152

Change-Id: I2d1fed0ea7869cb3b9315d46b51f80775939e607
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6279909
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421804}
2025-02-18 23:29:40 -08:00
ec07285944 Prerender2Fallback: Mitigate crash due to use-after-dtor of DocumentUserData
We found that there is a case that uses `DevToolsPreloadStorage` after
`DocumentAssociatedData::dtor()`, which is forbidden and cause a crash.
To mitigate this, this CL calls
`DevToolsPreloadStorage::GetOrCreateForCurrentDocument()` ahead and
checks `DevToolsPreloadStorage::GetForCurrentDocument()` to get knowing
`DocumentAssociatedData::dtor()` is already called or not.

For more details, see
https://docs.google.com/document/d/1ZP7lYrtqZL9jC2xXieNY_UBMJL1sCrfmzTB8K6v4sD4/edit?resourcekey=0-fkbeQhkT3PhBb9FnnPgnZA&tab=t.e4x3d1nxzmy3#heading=h.4lvl0yr9vmh7

Fixed: 394631076
Change-Id: I701ff6b0bb2bc50d4347d270dc4132490a437333
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6268901
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421801}
2025-02-18 23:07:55 -08:00
c2a639c8f0 Remove stale WebGL 1 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 webgl1_conformance

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Bug: 1490427, 328102507, angleproject:389733590
Change-Id: Ieed5cc647e3e5960ed39fe3eeb16d095cc110318
Fixed: 40939890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6279690
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@{#1421798}
2025-02-18 23:00:32 -08:00
99f1bf6d2b Deflake NavigatorTest.BeginNavigation etc.
This CL deflakes the following two tests.

- NavigatorTest.BeginNavigation
- NavigatorTest.BeforeUnloadDenialCancelNavigation

Even though these tests expect the existence of beforeunload handler,
there were no beforeunload handler attached. This was fine before. But
now RenderFrameHostImpl::SendBeforeUnload() checks the existence of
beforeunload handler. If there are no beforeunload handlers,
beforeunload handler mojo call will be skipped. This behavior mismatches
with the expectations of these tests. This CL fixes this problem by
specifying the existence of the beforeunload handler clearly.

- Sample failure of NavigatorTest.BeginNavigation:

navigator_unittest.cc(468): Expected equality of these values:
  NavigationRequest::WAITING_FOR_RENDERER_RESPONSE
    Which is: 1
  subframe_request->state()
    Which is: 3
https://chromium-swarm.appspot.com/task?id=6f1fa8b03d7fa611&o=true&w=true

- Run history of NavigatorTest.BeginNavigation:
https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_unittests%2FNavigatorTest.BeginNavigation

- Sample failure of NavigatorTest.BeforeUnloadDenialCancelNavigation:

navigator_unittest.cc(430): Expected equality of these values:
  NavigationRequest::WAITING_FOR_RENDERER_RESPONSE
    Which is: 1
  request->state()
    Which is: 3
https://chromium-swarm.appspot.com/task?id=6f2d3a93fc259d11&o=true&w=true

- Run history of NavigatorTest.BeforeUnloadDenialCancelNavigation:
https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_unittests%2FNavigatorTest.BeforeUnloadDenialCancelNavigation

This CL is a preparation CL for an upcoming
feature (https://crbug.com/396998476).

Bug: 396998476
Change-Id: Ie4a30683159548c457efb34049a603b303061982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6277974
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421781}
2025-02-18 21:34:19 -08:00
a3bc596ea3 Deflake WebContentsImplTest.CrossSiteNotPreemptedDuringBeforeUnload
This CL deflakes
WebContentsImplTest.CrossSiteNotPreemptedDuringBeforeUnload.

Even though this test expects the existence of beforeunload handler,
there were no beforeunload handler attached. This was fine before. But
now RenderFrameHostImpl::SendBeforeUnload() checks the existence of
beforeunload handler. If there are no beforeunload handlers,
beforeunload handler mojo call will be skipped. This behavior mismatches
with the expectations of this test. This CL fixes this problem by
specifying the existence of the beforeunload handler clearly.

- Sample failure:

web_contents_impl_unittest.cc(1396): Value of: orig_rfh->is_waiting_for_beforeunload_completion()
  Actual: false
Expected: true
https://chromium-swarm.appspot.com/task?id=6f3498d49fa73a11&o=true&w=true

- Run history of NavigatorTest.BeginNavigation:

https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_unittests%2FWebContentsImplTest.CrossSiteNotPreemptedDuringBeforeUnload

This CL is a preparation CL for an upcoming
feature (https://crbug.com/396998476).

Bug: 396998476
Change-Id: I48a40bf4df738f493eaba0cece08ffca90d50fab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6275700
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421780}
2025-02-18 21:33:56 -08:00
d78c9b1c59 Fix typo in deleted copy ops for SetPrioritySignalsOverrideBindings
Change-Id: I9680cacb3eb5b0dafbe57c1cce6bf57762569999
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6278089
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421776}
2025-02-18 21:20:44 -08:00
1ee594f1c3 Workaround: extension may ignore window clients in matchAll()
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}
2025-02-18 19:06:08 -08:00
ef158fea19 Remove unused include in immediate_accessibility_mode_policy.cc
Bug: 40318405
Change-Id: Ibc006e6a14a517a18d532f0001c66a3578892d08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6279532
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: David Sanders <dsanders11@ucsbalum.com>
Cr-Commit-Position: refs/heads/main@{#1421680}
2025-02-18 15:43:15 -08:00
e5fc253d6b Add AMD RX 7600 builders
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}
2025-02-18 15:04:37 -08:00
881a68baf2 Pass isRequired boolean to AccessibilityNodeInfoBuilder
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}
2025-02-18 14:01:47 -08:00
485a8d4bfa [RWS] Cleanup PostProcessSetLists API signature
This method is a no-op if the arg is an error, so we should just
forbid that in the type system instead of at runtime.

Change-Id: I7704820df1fbb63638bdbed938a68cd0601c627c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6277949
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421637}
2025-02-18 13:56:42 -08:00
2c68650592 [shared storage] Add lock usage UMAs
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}
2025-02-18 13:18:11 -08:00
92d5dbd30a Add CustomizableSelect to fieldtrial_testing_config
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}
2025-02-18 12:57:38 -08:00
878f835180 Move ParsedPermissionsPolicyDeclaration from Blink to Network service
The network service is going to need access to the "storage-access"
Permissions Policy. This is the third step of moving some of the
Permissions Policy logic out of Blink to maintain a single
implementation of https://w3c.github.io/webappsec-permissions-policy
across Chromium.

Bug: 382291442
Low-Coverage-Reason: LARGE_SCALE_REFACTOR
Change-Id: Ic6ad87dd4bd6f882a135a0c580d481dc1b219831
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6254141
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421574}
2025-02-18 12:16:02 -08:00
fdc85d82ca [webauthn] Use provider name for Windows passkeys
Use the new Windows WebAuthn v8 pwszAuthenticatorName property to label
credentials from third party providers on Windows.

Fixed: 396434681
Change-Id: I9044484a5d40617b0f1487f43710c5f659e91d8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6270536
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421527}
2025-02-18 11:17:17 -08:00
f804a20f6c Reland: crash upon bad message in network service process in test build
This is a reland of http://crrev.com/c/6203517, which was reverted due
to a test hitting the bad message. That issue has been fixed by
http://crrev.com/c/6243909 and we should be able to reland the change to
crash network service process upon bad mojo message in non official
builds.

As bad mojo message including the one triggered by kIncorrectLock should
not happen outside of tests or compromised renderer process, switch to
crash in non official builds when it happens so that potential code bugs
will be more visible.

Unit tests that expect bad message override bad message handler and
should not hit this crash.

Add kIgnoreBadMessageForTesting switch for browser tests that expect to
trigger bad message to ignore the reported bad message so that we don't
crash network service process when test is expected to trigger bad
message, and updated RenderFrameHostImplBrowserTest to use the switch so
that its URLLoaderFactoryNotTrusted test does not fail due to expected
triggering of bad message.

Note that we don't want to crash network service process upon bad
message from compromised renderer process. Therefore we don't use CHECK
or NOTREACHED() which now crashes. There is also still bugs like
http://crbug.com/40066149 that could cause the bad message. Therefore,
we strictly limit crashing to non official builds.

Bug: 40823083
Change-Id: I95c3cadadf1d7b2179099a4e9eac64d3e76bd162
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6270418
Commit-Queue: Liang Zhao <lzhao@microsoft.com>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421518}
2025-02-18 11:04:43 -08:00
b763ad37fa Rename virtual_keyboard_resize_height_physical_px to "device_px"
Change-Id: I013517df47c6939072103cf6f57eb777851c9ad0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6266164
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421504}
2025-02-18 10:54:25 -08:00
1866e7acb7 [ios blink] Fix build failures with too many ldflags
ldflags ended up getting duplicated and would throw the
linker off. Ensure the config isn't appended to but the
default is set for browserkit_extensions.

Bug: 40254930
Change-Id: Icba59ddb5afb3d67f60dcbd70934c934bd6bc04e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6275731
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421470}
2025-02-18 10:11:54 -08:00
0ef0f45f5b [discard] Log FrameTree::Discard() results to UMA
This CL introduces the Discarding.DiscardFrameTree histogram to
track the outcome of FrameTree::Discard().

Bug: 397324672
Change-Id: Ie97ff620370fd27405e575f2b754e20e35ddebb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6275510
Reviewed-by: Darryl James <dljames@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421464}
2025-02-18 09:59:42 -08:00
1fa15ef738 Remove vacuum_db_post_upgrade for v32
This version doesn't seem to do tasks to save DB space, like compression
or JSON -> Proto conversion, and the vacuum operation can slow upgrade.

Change-Id: I0b0bd73b29c64afe78f200bc4098133e4cb683c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6276349
Commit-Queue: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Auto-Submit: Caleb Raitto <caraitto@chromium.org>
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421433}
2025-02-18 09:05:50 -08:00
eb9cf8fc1f Writing Assistance API: explicitly invoke OnError() mojo call
Previously, AIManager returned an empty remote to indicate an error.
Instead, add a new `OnError()` mojo method, similar to Prompt API.

This CL also (1) updates the DOMException message for Rewriter and
Writer to the generic "The session cannot be created." message, consistent with Summarizer and Prompt (language model), and
(2) updates the Summarizer unit test to be more consistently aligned
with Re/Writer ones in terms of implementation style.

Bug: 394892664
Change-Id: I3bf50a91472a219386c6493868ddfd67fa17ee35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6265651
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Mingyu Lei <leimy@chromium.org>
Commit-Queue: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421406}
2025-02-18 08:18:32 -08:00
817a05ecbe Remove references to NavigationEntry/Controller in Zoom code.
The use of GetLastCommittedEntry() in HostZoomMapImpl and
related zoom code is a leftover artifact from when the
code primarily dealt directly with WebContents, which return
virtual URLs for GetLastCommittedURL(). The zoom map uses actual,
and not virtual, urls.

More recently the code has evolved to using RenderFrameHosts,
where GetLastCommittedURL() returns the url actually loaded.
This CL is a refactor/cleanup that gets rid of the calls to
GetLastCommittedEntry(), which is helpful in that it
simplifies by not needing to worry about the different
NavigationControllers that might be present on a page.

No behavior changes are expected in this refactor, with the
exception that we no longer propagate zoom change notifications
for empty urls that occur when encountering an empty initial
NavigationEntry. These notifications don't appear to have caused
problems, but presumably nothing is relying on them either.

Change-Id: I240759da71f87b47d88f1cff365c1bdd9f29d789
Bug: 372932834
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6258070
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: James Maclean <wjmaclean@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421384}
2025-02-18 07:51:15 -08:00
c5b9f58773 [ios blink] Remove com.apple.security.get-task-allow entilement
This entilement normally comes from the default entitlements in
the provisioning file. The provisioning profile provides
get-task-allow and these com.apple.security.get-task-allow were
incorrect because that value is for MacOS and not iPhone.

Bug: 40254930
Change-Id: I394951d8eccae0fabb3068157ced8ef44c8d4656
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6271283
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421382}
2025-02-18 07:46:18 -08:00
cccf8b18b3 Add browser test for keepalive fetch on prerendered pages
Add browser test to show that attribution reporting response headers for
keepalive fetch on a prerendered page are processed even if the page is
not activated when the keepalive fetch is handled in the browser
process. When the keepalive fetch is handled in the renderer process,
the response handling is deferred until page activation.

Bug: 395906295
Change-Id: I0aebd6100d0f254b0577625c89b5f806ce843282
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6271403
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421375}
2025-02-18 07:23:50 -08:00
7b36019d37 Integrate webui bundled code caching into resource fetch
This CL introduces the following classes to integrate the webui
bundled code cache into the existing resource fetch process
  - WebUIBundledCodeCacheFetcher
  - WebUIBundledCachedMetadataHandler

These are preferentially used when the appropriate web security
policy opts-in a given scheme and the request has a corresponding
code cache entry in the resource bundle. Otherwise code caching
falls back to the existing code paths.

Bundled code caches are backed by the application's resource cache
and checks are enforced across both classes to ensure no updates are
attempted by blink post-compile or by the platform during resource
fetch.

Bug: 378504631
Change-Id: Id98f918218a1a872d7002f5208a3c022079cead4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6181828
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421210}
2025-02-17 20:18:00 -08:00
8baf6e1297 Revert "Update HTTP request headers, body, and referrer policy on CORS redirect"
This reverts commit 17d4c9271b.

Reason for revert: Causing failures on chromeos-linux: https://luci-milo.appspot.com/ui/inv/build-8722649429850711985/test-results?q=FencedFrameReportEventBrowserTest.CrossOriginReportEventPost302RedirectGet&sortby=&groupby=

Original change's description:
> Update HTTP request headers, body, and referrer policy on CORS redirect
>
> This change updates the request on CORS redirect by removing the
> "request-body-headers" and body if the method has changed, and also
> updates the referrer policy, following 4.4 HTTP Redirect Fetch of the
> spec (https://fetch.spec.whatwg.org/#http-redirect-fetch). Chrome status
> entry: https://chromestatus.com/feature/5129859522887680.
>
> Bug: 40686262
> Change-Id: I7d54cb78fca8aedab527a80f90e8e63534d7d170
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6226486
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Viktoria Zlatinova <vizlatin@microsoft.com>
> Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1421142}

Bug: 40686262
Change-Id: Ibab5f7d2a555f38ca51db0f3dad5c82931d3da12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6275809
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Darren Shen <shend@chromium.org>
Owners-Override: Darren Shen <shend@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1421163}
2025-02-17 15:32:23 -08:00
694b3dcff6 webrtc-internals: show direction in folded sdp m= line
truncated example:
  m=video 9 UDP/TLS/RTP/SAVPF 96 97 (121 more lines) direction=sendrecv mid=0
Not done for the session part where the direction is not commonly shown

BUG=None

Change-Id: Ibb6843a7a0d2d6a5ed27e4c1beb55762bee194af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6274163
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421159}
2025-02-17 14:45:24 -08:00