0
Commit Graph

115355 Commits

Author SHA1 Message Date
7e784bcc68 android: Deflake ChildProcessLauncherHelperTest
Test was relying on Debug.waitForDebugger to hang child service, which
turns out to not always work on bots. Instead, just add a new command
line switch to get the desired behavior.

Bug: 354765949
Change-Id: I8ec11b228f1955a8ddee80b2cc160c3a61113093
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6113740
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399312}
2024-12-20 11:58:21 -08:00
266fb3313d WebUI: extend InternalWebUIConfig from more UIs
Specifically extending from chrome://tracing and
chrome://webrtc-internals. These UIs were identified by OWNERS in a
recent Chromium WebUI survey as targeted at Chromium developers and
as UIs that could be placed behind a pref.

The pref behavior is currently behind the InternalOnlyUisPref
feature flag.

Bug: 379889249
Change-Id: I05eae03748661e58d7dcf994e0c5a0d97cfe8c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107298
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399306}
2024-12-20 11:39:18 -08:00
581f2f512f Add payment to clientDataJson on payment credential creation.
Include the payment options (including the browser bound key) in the
clientDataJson, when a payment credential is being created.

PaymentOptions are set on payment credential creation only when browser
bound keys are enabled with the following flag:
chrome://flags/#enable-secure-payment-confirmation-browser-bound-key

Bug: 377278827, b:378708356
Change-Id: I0eab67e278d81b7d7e9eb86d3cb29072a79907a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6098330
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Slobodan Pejic <slobodan@chromium.org>
Reviewed-by: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399305}
2024-12-20 11:37:48 -08:00
de9e0a7713 Re-enable ImeTests
These tests should be fixed now that the target sdk has been updated.

Bug: 343821701
Cq-Include-Trybots: luci.chromium.try:android-14-x64-rel,android-14-arm64-rel,android-15-x64-rel,android-15-tablet-x64-dbg,android-16-x64-fyi-rel
Change-Id: I3fccbc5fddb4035bec22be3d06bdb70bb972ba7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105390
Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399300}
2024-12-20 11:35:06 -08:00
2313906f2c Remove display:block!important from customizable_select.css
1. Call UpdateStyleAndLayoutTree from IsAppearanceBaseButton and
   IsAppearanceBasePicker, unless no_update is set for cases which are
   calling from within a style/layout recalc.
2. Call EnsureComputedStyle when checking IsAppearanceBasePicker in
   order to get an appearance value despite the element being
   display:none due to it being a closed popover.

Since the picker might no longer have a computed style all the time,
this requires rewriting some accessibility code which was depending on
always having a computed style for the picker. I rewrote the
accessibility code to be more consistent across appearance:base-select
mode and appearance:auto mode by consistently using the UA popover
element as the MenuListPopup mapped element.

Bug: 364348901
Fixed: 364924715
Change-Id: I3fec57f2e02ce4200c95c256e5c1072b5c21ef8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953628
Reviewed-by: David Baron <dbaron@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399296}
2024-12-20 11:31:50 -08:00
aaac8a0611 WebUI: Reveal hidden deps to ui/webui/resources.
The //ui/resources:webui_resources_grd target does not belong under
ui/resources/, since its input file as well as all of its dependencies
are under ui/webui/resources/, which resides in a sibling folder.

Moving it under its proper ui/webui/resources/ folder, makes explicit
what other folders are already depending on ui/webui/resources/, instead
of having such dependencies disguised as pointing to ui/resources/, for
example from sereval ash/webui/ or ios/ targets.

Bug: 385086925
Change-Id: I998fb0ae31a33cd8f09d2af4bd7abf23707aaba6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6096291
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Owners-Override: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Sergio Collazos <sczs@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399284}
2024-12-20 11:10:37 -08:00
8827cc0b10 Reland "Remove target_sdk_version from content shell"
This reverts commit 2b04837b64.

Reason for revert: Only a single test failing so disable that test

Original change's description:
> Revert "Remove target_sdk_version from content shell"
>
> This reverts commit 65839523cc.
>
> Reason for revert: breaks an upstream bot https://crbug.com/385155403
>
> Original change's description:
> > Remove target_sdk_version from content shell
> >
> > This CL also fixes the WebContentsAccessibilityTests that were failing
> > with the new SDK version.
> >
> > Bug: 40137544,355208071,343808767
> > Change-Id: I05d482af7a3c02d3032408acd5a0ae7958cc2f31
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5769775
> > Reviewed-by: Mark Schillaci <mschillaci@google.com>
> > Commit-Queue: Alex Mitra <alexmitra@chromium.org>
> > Reviewed-by: Peter Beverloo <peter@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1397838}
>
> Bug: 40137544,355208071,343808767,385155403
> Change-Id: I5962d1d611a2064136819c22fa121fa58ec0d422
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108773
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Alex Ilin <alexilin@chromium.org>
> Auto-Submit: Alex Ilin <alexilin@chromium.org>
> Commit-Queue: Alex Ilin <alexilin@chromium.org>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1399100}

Bug: 40137544,355208071,343808767,385155403
Change-Id: I03b7968a623d90c7d1504cd528332a508af64acb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108775
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Owners-Override: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399274}
2024-12-20 10:51:30 -08:00
bceab686c6 Fix missing deps in content/browser/tracing/trace_report
trace_report.mojom includes
content/browser/tracing/trace_report/trace_report_database.h which
depends on an auto-generated file sql/sql_name_variants.h.

This CL makes sure that sql_name_variants.h is generated before
generating C++ file from trace_report.mojom.

Bug: 385158081
Change-Id: Ibd6fc5714302b3642e4b88e3e2487a7e39dced39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6114572
Commit-Queue: Peter Wen <wnwen@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399254}
2024-12-20 10:01:09 -08:00
fdda4c07eb [Code Health] Remove stale feature BackForwardCacheWithKeepaliveRequest
Bug: 356624794
Change-Id: I34d060b390afd7e2befe7426d1e10fcfa69089c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102406
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Ming-Ying Chung <mych@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399236}
2024-12-20 09:41:03 -08:00
2b04837b64 Revert "Remove target_sdk_version from content shell"
This reverts commit 65839523cc.

Reason for revert: breaks an upstream bot https://crbug.com/385155403

Original change's description:
> Remove target_sdk_version from content shell
>
> This CL also fixes the WebContentsAccessibilityTests that were failing
> with the new SDK version.
>
> Bug: 40137544,355208071,343808767
> Change-Id: I05d482af7a3c02d3032408acd5a0ae7958cc2f31
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5769775
> Reviewed-by: Mark Schillaci <mschillaci@google.com>
> Commit-Queue: Alex Mitra <alexmitra@chromium.org>
> Reviewed-by: Peter Beverloo <peter@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1397838}

Bug: 40137544,355208071,343808767,385155403
Change-Id: I5962d1d611a2064136819c22fa121fa58ec0d422
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108773
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Alex Ilin <alexilin@chromium.org>
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1399100}
2024-12-20 04:16:43 -08:00
16e43d8e64 Add direct dependency between //content/browser and //sql
Bug: 385158081
Change-Id: Id5355879e586f55897fd0ce606395ef7de174973
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108771
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Samar Chehade-Lepleux <samarchehade@google.com>
Commit-Queue: Samar Chehade-Lepleux <samarchehade@google.com>
Cr-Commit-Position: refs/heads/main@{#1399095}
2024-12-20 03:55:41 -08:00
d4edfd03c6 Prefetch: TestPrefetchWatcher::PrefetchUsedInLastNavigation returns bool
Before this CL, TestPrefetchWatcher::PrefetchUsedInLastNavigation
returns std::optional<bool> so that it can return std::nullopt when the
first navigation hasn't happened yet.

However, since std::optional<T>::operator bool is equivalent to
std::optional<T>::has_value(), if we do something like
EXPECT_TRUE(test_prefetch_watcher.PrefetchUsedInLastNavigation()) for
example, it passes even if its value is false (i.e., prefetch was not
used in last navigation).

Although it is avoidable if test writers are aware of this, this CL
changes this to return bool to prevent such mistakes from happening in
the first place.

Bug: n/a
Change-Id: I544f4d63eeaf0914bb72440ce40901a2a5f40a65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6059306
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398990}
2024-12-19 18:22:27 -08:00
25b184ada0 [AX Mac] implement accessibilityCellForColumn method
Implement accessibilityCellForColumn methods, and hide its
NSAccessibilityCellForColumnAndRowParameterizedAttribute attribute
counterparts under a flag.

Test: `out/.../accessibility_unittests \
   --gtest_filter="*AccessibilityCellForColumn*"`

Include-Ci-Only-Tests: true
Cq-Include-Trybots: luci.chromium.try:mac-fieldtrial-tester

Bug: 363275809
Change-Id: I4bd84a5a6d2add97b71162324497629b64bed475
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069954
Commit-Queue: Alexander Surkov <asurkov@igalia.com>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Jayson Adams <shrike@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398984}
2024-12-19 18:13:55 -08:00
ea1a3df82f hid: Allow privileged extensions to access non-FIDO interfaces
This CL enables privileged extensions to bypass HID blocklist
restrictions to access non-FIDO interfaces on devices that are
known to be security keys.

18d1:5026 Google Titan key

Bug: 383617626
Change-Id: Iaa9bd6edcd097e1b7e4a62456ea2dfec1af19b1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089485
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398974}
2024-12-19 17:30:59 -08:00
c63f5750cf Rename DidCommitProvisionalLoad trace event to DidCommitNavigation
This should make the trace event actually reflect the function name
in which it's used. Also move the event to the start of the function
so that it actually covers all the work done there.

Bug: 382303496
Change-Id: Ia63978887b7d2e951e7d475e07be6a1b9edf0382
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102298
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398946}
2024-12-19 16:47:28 -08:00
8cc9de0f9c webnn: Remove unused deps in //content/gpu
The WebNNService mojo interface used to hook into
content/gpu/gpu_child_thread_receiver_bindings.cc but that code was
moved elsewhere in https://crrev.com/c/4615740

Change-Id: I91d8226095732850b39e95b16b7f69722fe4a080
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5967533
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Auto-Submit: Austin Sullivan <asully@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398923}
2024-12-19 16:00:16 -08:00
b5c7b5733e Enable CacheStorageTaskPriority feature by default.
UMA shows solid improvement at higher percentiles.
See analysis on the issue tracker.

Bug: 385170152
Change-Id: I254614e0c45ce9f285cd9c04df9d1deeceda95dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108091
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398859}
2024-12-19 13:59:01 -08:00
73cea88178 Introduce PDFV4 metrics for raster scroll feature.
Expand scrolling thread logic to account for scroll rasterization for all types of scroll trackers

Account for scroll raster frame drops in PercentDroppedFrames V4 metrics: https://screenshot.googleplex.com/5LojssEmweFqHzC

Bug: 373818285
Change-Id: If5a417c8780806e17b87b7d1150f1f91e835809e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6031570
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Stacy Gaikovaia <gaiko@google.com>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398784}
2024-12-19 12:12:11 -08:00
8b2604b0f9 [IndexedDB] Make OpenFileAndReadIntoPipe succeed when fewer bytes read
The following changed `content::indexed_db::OpenFileAndReadIntoPipe()`
behavior:

https://chromium-review.googlesource.com/c/chromium/src/+/5898304

Prior to the change, `OpenFileAndReadIntoPipe()` considered reading up
to N bytes as success.  After the change, `OpenFileAndReadIntoPipe()`
must read exactly N bytes to succeed.  When expecting more bytes,
`FileStreamReaderToDataPipe` reads the end of file instead, which is
handled differently than before.

Before:

After reading end of file, `FileStreamReaderToDataPipe::ReadMore()`
calls `OnComplete(result)`.  `result` is 0 since it is end of file.
0 is also the status code for `net::OK`, which causes the read to
succeed.

After:

`FileStreamReaderToDataPipe::ReadMore()` calls
`OnComplete(net::ERR_FAILED)` in response to reading end of file.

The fix restores the original behavior and adds unit test coverage.

Bug: 383157185
Change-Id: I0b976252331209d0453cbef14be5b1e3b24e8c90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102095
Reviewed-by: Rahul Singh <rahsin@microsoft.com>
Commit-Queue: Steve Becker <stevebe@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1398772}
2024-12-19 11:59:39 -08:00
9c7fef7278 Change Observers: Create quota limit override function
This gets rid of the quota manager quota limit override and the inotify
FilePathWatcher quota limit override and replaces it with a single
static SetQuotaLimitForTesting function in FilePathWatcher.

This lest us clean up by both deduping the logic and now we don't have
to rely on a quota manager existing before overriding the quota limit.

Bug: 338457523
Change-Id: I22cadaf3f8fd48daa72a6046a7ed08bb31a21ee5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107713
Reviewed-by: Daseul Lee <dslee@chromium.org>
Reviewed-by: Rahul Singh <rahsin@microsoft.com>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398747}
2024-12-19 11:24:07 -08:00
9196751e4d Fix A13 tests
Fixes the GPU tests on the Samsung A13 devices since testing has
been paused for a long time.

Bug: 40236913
Change-Id: Ib6d13d2f0e72d562d899446e21d819c999031fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6100336
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398738}
2024-12-19 11:11:18 -08:00
a58edee5d3 MediaSession: Generate player IDs on the Blink side
Blink registers media players to the browser to report metadata and
receive actions to handle. As part of this, it has a unique ID per
player that it uses when communicating with the browser. Currently,
these IDs are generated by the WebMediaPlayerDelegate in //content.
However, this creates problems when a non-WebMediaPlayer wants to
register itself as a media player to the browser and needs a unique ID.

This CL moves the ID generation entirely into Blink, usable by
non-WebMediaPlayers (e.g. WebAudio contexts) to get IDs without
collision for use when communicating with the browser.

Bug: 382316461
Change-Id: Ic38331bb31a38bbba21080fe83a5d4a116cb649b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6098750
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398733}
2024-12-19 11:04:40 -08:00
4ba84a5fd4 MediaSession: Don't unduck if ducked during audio focus request
Media sessions unduck themselves when they are granted audio focus, as
they assume that they must now be unducked as they're at the top of the
audio focus stack. However, in some cases they are still ducked despite
getting audio focus, signalled by the AudioFocusManager re-ducking them
during the processing of the request.

This CL updates MediaSessionImpl to only unduck itself after being
granted focus if it did not get re-ducked while awaiting the focus
request result.

Bug: 384549638
Change-Id: Ie033712ccd0cb7ad13498fca0bf6f182ec57f9c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108076
Reviewed-by: Frank Liberato <liberato@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398731}
2024-12-19 11:03:28 -08:00
7f305b0c2a Revert "Set content shell's target SDK to 30"
This reverts commit b77128985d.

Reason for revert: Tests that were failing have been disabled

Original change's description:
> Set content shell's target SDK to 30
>
> We removed the target SDK making it the current Android version
> in http://crrev.com/c/5769775 however this caused some test
> failures.
>
> Setting target SDK to 30 until we can fix the tests that break
> when it's set higher.
>
> Bug: 384901333,40139186
> Change-Id: I4f2e9829e798e15df3756d4aba9dd29431fba266
> Cq-Include-Trybots: luci.chromium.try:android-15-x64-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105871
> Auto-Submit: Alex Mitra <alexmitra@chromium.org>
> Commit-Queue: Peter Beverloo <peter@chromium.org>
> Reviewed-by: Peter Beverloo <peter@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1397969}

Bug: 384901333,40139186
Change-Id: I65731932837ebc14e2acb0e87debdf013da0f15b
Cq-Include-Trybots: luci.chromium.try:android-15-x64-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111149
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398726}
2024-12-19 10:58:59 -08:00
c3c3ad659f Disable testPassJavaObjectFromCustomClassLoader on U+
Bug: 385137265
Cq-Include-Trybots: luci.chromium.try:android-13-x64-rel,android-14-x64-rel,android-14-arm64-rel,android-15-x64-rel
Change-Id: I33a711a691d66b19f91812da7eaaa7c99ae7c09d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110777
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Auto-Submit: Alex Mitra <alexmitra@chromium.org>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398682}
2024-12-19 10:02:23 -08:00
c82c517409 android: Remove warm up privileged service
All callers only call warm up with sandboxed=true. So removed the
privileged (sandboxed=false) path. This involves removing a test as
well.

Bug: 354765949
Change-Id: I2414a2fb315983efff1a349d9a173dda670565b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111436
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398675}
2024-12-19 09:52:30 -08:00
70c2a42552 Change Observers: Fix Observation Groups using different FileSystemURLs
When observing the same file or directory with the same storage key,
different observation groups were being used. This would mean that sites
would pay usage for each observation regardless if they were already
observing that file or directory.

This is due to commit 61f47bcdc1 which
incorrectly implemented the operator<=>. Special handling was needed for
FileSystemURLs representing local file paths. See crbug.com/40249324.

This CL updates it so that the FileSystemURL::operator<=> uses the same
special handling that FileSystemURL::operator== uses.

Fixed: 384844018
Change-Id: Ie52e0f7f70194cbf0e089119044c01db88039e96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6106811
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398657}
2024-12-19 09:35:30 -08:00
c191c1936a Change Observer: Ensure safe use of Quota Manager
Using the quota manager incorrectly can lead to errors with usage
underflows. Even if we changed usage to be a type that could go
negative, it would still be a bug for it to be negative.

This changes it so that a change source / observation group just has to
report its current usage and the rest is taken care of by the quota
manager and it's handles.

Bug: 338457523
Change-Id: Ib06522e91ba7ba61182a6645488d46873d0f67e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107294
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398656}
2024-12-19 09:34:45 -08:00
cff83fb8dc Change Observers: Merge obsever quota manager test suites
This merges FileSystemAccessObserverQuotaManagerTest and
FileSystemAccessObserverQuotaManagerWithWatcherManagerTest into a single
test suite.

Bug: 338457523
Change-Id: Icf2848be966ca3dce7cccf2f432575ec7f619bb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107831
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398654}
2024-12-19 09:33:35 -08:00
2ef26e9b98 [NSP] NAK comment cleanup
Cleaning up some old comments related to network state partitioning.
The work for these was done in:
 - https://chromium-review.googlesource.com/c/chromium/src/+/1966235
 - https://chromium-review.googlesource.com/c/chromium/src/+/2209407
 - https://chromium-review.googlesource.com/c/chromium/src/+/2584466

Fixed: 40658165
Change-Id: I5eb1d29d520582923831e4b5cb8fc0a4621a9238
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108596
Reviewed-by: mmenke <mmenke@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398652}
2024-12-19 09:32:24 -08:00
6cf4c37f9d [Tab Freezing] Proposal to track blocking IndexedDB transactions
Right now, tab freezing is based on the existence of an IndexedBD
connection. This is too conservative. Telemetry data shows that a
large number of tabs are opted-out of tab freezing because of
IndexedDB.

With this change, tabs are only opt-out if they are running
a IDB transaction that actually blocks another client. This is done
by refactoring the DisallowInactiveClient() functionality to also
handle frozen documents.

The existing ObservedFeatureType named kIndexedDBConnection is
renamed to kBlockingIndexedDBLock to track this scenario, which
is then used to opt-out the tab from freezing.

Bug: 362464956
Change-Id: If455789e900c232813d045b831e937a042a334c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838043
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Owners-Override: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398627}
2024-12-19 09:11:12 -08:00
f42b061d44 Bug Fix: Check null before accessing optional variable.
interest_group->ads (and adComponents) are optional. Need to check
whether they're null before accessing their values.

Change-Id: I6199d85e384bd1bb6d8a99c9f75272e60d9bd777
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108180
Commit-Queue: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1398593}
2024-12-19 08:06:24 -08:00
c82ed4f515 [Protected Audiences] Add 30 second timeout to TrustedSignalsFetcher.
This matches to timeout in AuctionDownloader. To keep the values in
sync, this CL introduces a constant in AuctionDownloader that both
classes now use.

Also fix a broken AuctionDownloaderTest timeout test that was intended
to test its timeout logic but wasn't actually doing so.

Bug: 379843989
Change-Id: Ieef3f323b59e92ba1605109edee9ac87006f8d7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105212
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398580}
2024-12-19 07:55:38 -08:00
4d1d7f9b83 [//content] Convert test_plugin away from SharedImageMapping
Converts to the functionally-equivalent new API that holds the
SharedMemoryMapping inside the ClientSharedImage and exposes it via
ScopedMapping.

Bug: 40064122
Change-Id: I185a87ec0fb121c9235d17472dc9f057bf4627ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110451
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398531}
2024-12-19 06:28:41 -08:00
27c3106041 [Cast Streaming] Migrate GVAFImpl to MojoGVAF
This patch moves the GpuVideoAcceleratorImpl to media/mojo/clients
and renames it to MojoGpuVideoAccelerator. This class can now be used
both in content and in components/mirroring.

Cast Streaming will be updated to use this implementation to enable
hardware mirroring in the media::cast::MediaVideoEncoderWrapper
implementation.

Googlers may view the related design doc at:
http://go/cast-streaming-media-videoencoder

Publicly published design documentation available at:
https://tinyurl.com/cast-streaming-mvew

Bug: 282984511
Change-Id: I91bba38ea55007d3f3626027308d800aeda0a383
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6095257
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398421}
2024-12-18 22:40:49 -08:00
2b59b56d74 IWYU: Add missing include for base::StringPrintf usage in //content/browser/renderer_host/media
In some files the base::StringPrintf is used without corresponding
include.
Added missing include for base::StringPrintf usage in
//content/browser/renderer_host/media.

Bug: none
Change-Id: I71a09380918dd05d439b150ae7fee1edf158359d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097473
Reviewed-by: Henrik Boström <hbos@chromium.org>
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Commit-Queue: Ivan Murashov <ivan.murashov@lge.com>
Cr-Commit-Position: refs/heads/main@{#1398410}
2024-12-18 21:17:34 -08:00
de9ac5eac8 Loosen upper/lower limit of NetworkServiceBoundedNetLogBrowserTest
10% buffer doesn't seems to be enough. Increase to 15%.

Bug: 384990661
Change-Id: I727989a28cc89743804667d1b819bf31952ab004
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6109612
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398405}
2024-12-18 20:42:47 -08:00
88d05ae28b Remove more Lacros leftovers from content/
- Remove IS_CHROMEOS_LACROS code
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Similarly for is_chromeos_lacros/is_chromeos_ash.
- Drop obsolete includes/build dependencies.
- Drop lacros-chrome browser tag from gpu tests
- Drop obsolete skip directives from gpu tests

No change in behavior.

Bug: b:365742770 , b:365741912
AX-Relnotes: n/a.
Change-Id: I594d3677a9855d0649deba3ad836a1b3804440f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097832
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398368}
2024-12-18 18:25:18 -08:00
5b86fcd766 Fix on-device Web Speech API error events
This CL fixes the error events thrown by the on-device speech recognition engine used by the Web Speech API.

Fixed: 384527859,384090944
Change-Id: Iedd77fdc40fa64ad9286406634a5a94932822b1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097084
Commit-Queue: Evan Liu <evliu@google.com>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398341}
2024-12-18 17:04:55 -08:00
69e3285de3 [Code Health] Remove stale feature AdAuctionReportingWithMacroApi
Bug: 356624412
Change-Id: Ia4615274701cd959cdb59782b967bfbea690fdec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097702
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Cr-Commit-Position: refs/heads/main@{#1398322}
2024-12-18 16:18:40 -08:00
a113508184 Code Health: Clean up stale NotificationContentImage
Fixed: 356624364
Change-Id: I91db3ebf4ea3c5a9dbc0d97cddb3fad78ed1e911
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090091
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398301}
2024-12-18 15:55:07 -08:00
3fce0a9654 [A11y] Caret offset incorrect when caret inside embedded object
We have code that automatically increments the offset if it's on
an embedded object. It was added in 2015 in this CL:
https://codereview.chromium.org/1377733002.
It's now in AXPlatformNodeBase::GetSelectionOffsetsFromTree().
The comment says "The IA2 Spec says that if the largest of the two
offsets falls on an embedded object character and if there is a
selection in that embedded object, it should be incremented by one so
that it points after the embedded object character. This is a signal to
AT software that the embedded object is also part of the selection."

However, it's weird if this code is clearly wrongly applied to caret
offsets, because it makes it look like the caret is after the embedded
object when there's a selection inside. Some relevant text from the
IAcceessibleText docs at https://wiki.linuxfoundation.org/accessibility/ia2/ia2_implementation_guide :
"As mentioned in item B, in the section entitled “The caret”, the client must be able to start from the object with focus, and by recursively using the IAccessibleHypertext interface, find the object that contains the caret. Therefore, a call to IAccessibleText::caretOffset on the object with focus must always return the HRESULT S_OK and a valid offset value. If the offset value returned indicates an embed character, the client must be able to use the IAccessibleHypertext interface as described in the previous section to downwardly traverse the object hierarchy until it finds the object containing the caret."

The code got mixed together because the end offset is used for the
caret offset. We fix this by only incrementing the end offset
when the selection is being retrieved for selection offsets, as
opposed to for a caret offset.

Fixed: 378692760
Change-Id: I5b66f2cb4ceb57447f0910f24e18e7a4d775ee04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6091642
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Lucas Radaelli <lucasradaelli@google.com>
Cr-Commit-Position: refs/heads/main@{#1398299}
2024-12-18 15:52:19 -08:00
9e9e12b61e WebUI: Refactor InternalWebUIConfig so that content/ WebUIs can use it
Move the InternalWebUIConfig class to content/public/browser so that
it can be leveraged by content/ WebUIs. The WebxrInternals UI is
migrated to use the config in this CL as a demonstration, since its
OWNERS said the UI could be placed behind an internal debugging UIs
pref in a recent Chromium WebUI survey.

The implementation of InternalWebUIConfig relies on some chrome-
specific logic, notably prefs and the InternalDebugPagesDisabled
WebUI page interstitial. Based on advice from content/ OWNERS,
move this logic out of InternalWebUIConfig and add an API to the
ContentBrowserClient for overriding internal WebUIs with a default
implementation that is a no-op/never overrides. Implement this
API from ChromeContentBrowserClient using the logic that was
previously in InternalWebUIConfig.

Also migrating the InternalWebUIConfig unit test by splitting it
into a new unit test for the content portion of the class in
content/browser/webui and an additional unit test for
ChromeContentBrowserClient that tests the Chrome-specific logic
(i.e. respecting the pref and feature flag).

Bug: 379889249
Change-Id: I2d0b3df8997b7d5b4a717b4dc08e5156b40e46cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6096297
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398292}
2024-12-18 15:39:39 -08:00
dd2d901c3e Assert that database tag is valid at compile time
This CL adds facilities to assert at compile-time that a database tag
passed to the `sql::Database` constructors is specified in the
DatabaseTag variant list in the corresponding `histograms.xml` file.

For many users of `Database`, this change is a no-op. That said, some
create databases with `make_unique()`, and the mechanism for forwarding arguments used by that function is incompatible with the
implicit invocation of the consteval constructor this CL introduces.
For this reason, these callers are also updated to explicitly create
the tag object.

Finally, 19 databases were using tags not defined in the histograms
file, so this CL adds these tags as variants.

Change-Id: I7aa6fdc4b923325cc41038fef72b239b5c19e4bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6055279
Reviewed-by: Robert Liao <robliao@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Bo Majewski <majewski@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398280}
2024-12-18 15:25:28 -08:00
fec8d50d34 [Protected Audiences] Add "Ad-Auction-Allowed" check to signals fetcher.
In particular, to TrustedSignalsFetcher (used for the KVv2 caching
path).  To make sure behavior is consistent with AuctionDownloader,
this CL makes both classes use a common helper method.

Bug: 333445540
Change-Id: I97f656f79ad81cec5deea3f2219ddf28e2a5b315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6106112
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398210}
2024-12-18 13:32:44 -08:00
9aceb7c806 [PWA/NavCapture] Add 'enable for non-auto client modes' mode.
This change adds another mode for the navigation capturing feature where
navigation capturing is enabled for an app only when the app sets a non-auto client mode in it's manifest.

When we attempt to launch the on-by-default version, there is a chance
that users or devs are annoyed that new app windows open all the time
for apps that don't set a client_mode in the manifest (instead of
keeping one window open only). This setting will enable the navigation
capturing by default for all apps that set a client_mode in the
manifest, which will be much more directly correlated to a good user
experience as the dev has specified the client mode launch handling
behavior.

R=dibyapal@chromium.org

Fixed: 384797864
Change-Id: I3df5cff9d5134e9420292dcf59f7df5ce3c968d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102391
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398188}
2024-12-18 13:11:05 -08:00
0f68948be4 Disable AndroidFontLookupImplTests which are failing on R+
Bug: 384944230
Change-Id: I8a79d918144de92104ac1f4cc6644f630da8c027
Cq-Include-Trybots: luci.chromium.try:android-15-x64-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6106591
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Auto-Submit: Alex Mitra <alexmitra@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398162}
2024-12-18 12:40:30 -08:00
f2db5409f4 Android: Add @NullMarked to media_java and its deps
Leaves VideoCaptureCamera.java and VideoCaptureCamera2.java as
@NullUnmarked. Their design isn't really compatible with null-checking.

Bug: 40657579
Change-Id: I21b6b22e559e2e9ad6721c6e154dc2b01c687c2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6096491
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398144}
2024-12-18 12:10:26 -08:00
2c93ce741b android: Disconnect file chooser on tab deactivation
Android version of r1396797.

This is a mitigation for avoiding user confusion on which tab / origin
initiated file selection.

Change-Id: Ifa219c3b5643e877ff54aafba4701407041fc54f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6096967
Commit-Queue: Bo Liu <boliu@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398113}
2024-12-18 11:40:10 -08:00
2cb47c2b49 [FSO] Add UKM logging for FileSystemObserver usage
UKM collection review doc (internal): https://docs.google.com/document/d/1CwrLUY_2tSWfjIAkIfEpR4VfIjfdRZq5e6WLkkYMnlg/edit?usp=sharing&resourcekey=0-c4PavPP8GrJhKrK2jNFLGQ

Bug: 338457523
Change-Id: I270c08e9ca3c66e366c8ac7c93cfdc15bd67ef00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6071345
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Nathan Memmott <memmott@chromium.org>
Commit-Queue: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398091}
2024-12-18 11:09:16 -08:00