0
Commit Graph

99736 Commits

Author SHA1 Message Date
292493cebb SetAdComponentss() -> SetAdComponents()
Change-Id: I5af636b834074b54490fc2153211bc4c4a0ddcc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4234022
Commit-Queue: Matt Menke <mmenke@chromium.org>
Auto-Submit: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103386}
2023-02-09 18:51:15 +00:00
d1b3c03758 [Browsing Data Model] Report access for Attribution Reporting
Propagates the topmost ancestor of the target frame to allow the BDM to access PageSpecificContentSettings in the Chrome client whenever a source or trigger is accessed.

Bug: 1412085
Change-Id: Ifb3d711c749aac069f4ec1188ec20d88f263580b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4221460
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Mariam Ali <alimariam@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Thomas Quintanilla <tquintanilla@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103324}
2023-02-09 17:19:46 +00:00
8e3d37a8c9 [StorageKey] Switch to kCrossSite Default
It makes more sense to have a default of kCrossSite and only use
kSameSite when the storage key is actually first-party. This will allow
construction logic to simplify when I followup and reduce the amount of
methods available.

Bug: 1410254
Change-Id: I02dfc4ee431b17bf0c53929409d6ca59e0fa27dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225216
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103310}
2023-02-09 17:01:26 +00:00
761a50a70e FSA: Fall back to create + copy if cloning a swap file fails
Cloning could fail if the file's underlying file system does not support
copy-on-write, such as when accessing FAT formatted external USB drives
(which do not support copy-on-write) from a Mac (which otherwise does)

Adds a number of unit tests, since this cloning was accidentally
completely uncovered by automated tests. Whoops.

Bug: 1413443
Change-Id: I28f742e1da99fc5e2e923074f2ab571742b5ffb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4229137
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103307}
2023-02-09 16:59:11 +00:00
11b28b1c63 [FedCM] Implement auto sign-in cooldown
When a user is auto signed-in and logs out to switch the account being
used, they might run into a deadloop where they are auto signed-in into
the same account again. We add a 10 minute cooldown which starts from
the time a user is auto signed-in. Within the cooldown, the user will be
able to sign-in explicitly through choosing an account on the dialog.
The cooldown time will be subject to change as we have yet to gather
metrics to validate if 10 minutes is ideal.

Bug: 1408533
Change-Id: Ic3323d5f638cc0c21124b6561131b8b874350639
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4216231
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Zachary Tan <tanzachary@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103248}
2023-02-09 13:53:36 +00:00
8764dd4512 Introduce a safe-mode for the VideoCapture Service
On macOS, this disables loading 3rd-party DAL plugins, which may
crash upon use.
This relies on the hardened runtime from signed binaries.
When the CHILD_PLUGIN option is passed, the runtime is disabled and
3rd-party DAL plugins are allowed.
For developers convenience who cannot sign their binaries,
an environment variable was identified within the the macOS libraries
to achieve a similar effect and skip loading all DAL plugins.

This is enabled by the RetryGetVideoCaptureDeviceInfos feature which
is also updated accordingly.

The feature can now handle a service crash properly and is compiled
on all platforms, though only macOS will have at most one retry.
On the second attempt, the VideoCaptureService safe-mode will be
enabled.

Traces of the old RetryCount are removed since the value is unused.

Bug: 990381
Change-Id: If042b19006ef4166260941af5485897f65e5e0de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209899
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Tony Herre <toprice@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103243}
2023-02-09 13:43:30 +00:00
a187144c02 Enable resolution change on VM virtual display
DRM_MODE_CONNECTOR_VIRTUAL has been treated as internal to test tablet
features inside Chrome OS VM. But it also prevents display resolution
from being changed. The new flag --drm-virtual-connector-is-external
added in this CL will treat virtual displays as external, making it
possible to test display resolution change in VM testing.

Bug: b:266527483
Test: Change display resolution in CrOS VM with vkms or virtio_gpu
Change-Id: I83fdefed8b57cda016a6cd6fbbbd476fa6a7209f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4190424
Commit-Queue: Yi Xie <yixie@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103145}
2023-02-09 06:33:06 +00:00
1c683d8acd Store calculated service worker script checksums to the database
This CL adds the mechanism to save the chekcsum hash strings of service
worker scripts, which are calculated while the service worker update
check process. After this CL, if the user has the service worker script
info in the database and its |sha256_checksum| is empty, the update
checker returns the sha256 checksums for both main and sub scripts,
regardless of the update check result.

Once the update check finished, the browser tries to update the script
resource list and store it to the database with the newly calculated
checksums.

We don't update the service worker version since the only updated thing
is the |sha256_checksum| record in DB and that is no user visible
change. However, this decision introduced more code changes, so using
`StoreRegistration`, or adding the option not to create the new version
to `StoreRegistration` may be another good option, at least in terms of
the code complexitiy. Feedback is welcomed.

Bug: 1371756
Change-Id: Ie4cf2033c0f06407e41e7d35fae048ce9741877c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4210875
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103144}
2023-02-09 06:20:20 +00:00
92dec6c3f1 Make Sha256 checksum browsertests more comprehensive
A follow-up CL to the service worker sha256 checksum browsertests.
Currently checksum browsertests are written in
`Sha256ScriptChecksum_ImportScripts` and
`Sha256ScriptChecksum_StaticImport`. But the current test coverage is
not enough since we don't test the following scenarios:

1. Both main and imported scripts are updated.
2. Main script is updated, but imported script is not.
3. Imported script is updated, but main script is not.

Also, above casees should be covered in both `ImportScripts` and
`StaticImport` tests. In addition to them, we cover the case when both
main and imported scripts are not updated (this case is already
covered).

As a result, we should cover 8 below cases.

- main(changed or not changed)
- imported(changed or not changed)
- script-type(classic or module)

This CL addresses the review comments in
https://chromium-review.googlesource.com/c/chromium/src/+/4172667/comment/01d97888_d5d02666/

Bug: 1371756, 1409787
Change-Id: Id29a1e072de001eddfd8527e7b0c05a153b35fbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4231052
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103118}
2023-02-09 04:35:35 +00:00
5cbeb35040 [Cast Streaming] Disable HiDPI + Mirroring
This patch disables HiDPI during mirroring sessions by default, and puts
this feature behind a new Chrome flag:

\#enable-cast-streaming-with-hidpi

Bug: 1412589
Change-Id: I382c41d638454323fa22af3b0463077d10090a01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4220235
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103101}
2023-02-09 03:30:45 +00:00
7223a930c1 [3PSP Session DT] Add redirect storage test
This more closely mimics the firebase bug we are seeking to mitigate
with the deprecation trial.

This fixes a bug where we de-registered the origin based on whether the
iframe had the OT token included. This logic is incorrect, as we should
be taking the 'word' of the page when it's first party only.

Bug: 1399319
Change-Id: Iba20f004fa9c35e17c5f445bf99378f04ea1f984
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232870
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103088}
2023-02-09 02:37:59 +00:00
465802848d Remove base::SequenceBound usage in content::EmbeddedWorkerInstance.
It is no longer needed, since EmbeddedWorkerInstance and its
ServiceWorkerContentSettingsProxyImpl both run on the UI thread now.

Bug: 824858
Change-Id: I6baa89dffe5edf49210fde5c1bdfe5c1b596640e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4207049
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103072}
2023-02-09 01:56:57 +00:00
49ab3f5754 Disable 13 keyboard lock tests on fuchsia.
The revert to fix this has conflicts https://crrev.com/c/4232185
so just disabling the tests.

Bug: 1414160
Change-Id: Ie0318988f1db77bbd6beff2be3e17d106ababd4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4235278
Owners-Override: Fergal Daly <fergal@google.com>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Nick Yamane <nickdiego@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1103070}
2023-02-09 01:55:50 +00:00
207bca6048 Add GPU coverage tag
Adds the clang-coverage/no-clang-coverage tag pair to the GPU
integration test harness. The former is added if the browser is
compiled with use_clang_coverage=true, otherwise the latter is added.
In practice, this should mean that the former is added when run from coverage bots but not anywhere else.

Bug: 1413845
Change-Id: I1949e853e172d3d3c2b74a64fe5b67de758ace72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4228121
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103044}
2023-02-09 01:04:03 +00:00
b49d6c9ec1 Clean up old graphics owners.
Change-Id: I8d00307d3da39460a5d8c5a6affa8e09752ebb3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4227939
Auto-Submit: Victor Miura <vmiura@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Commit-Queue: Victor Miura <vmiura@chromium.org>
Reviewed-by: Keren Zhu <kerenzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103023}
2023-02-09 00:00:04 +00:00
7d8d2cca51 Stop creating WebURLLoader in ServiceWorkerNetworkProviderForFrame
Currently ServiceWorkerNetworkProviderForFrame::CreateURLLoader() in the
content layer is called to create a WebURLLoader from
blink::LoaderFactoryForFrame::CreateURLLoader().

We'd like to stop exposing blink::WebURLLoader to the content layer.

So this CL does the followings:
 - Replace ServiceWorkerNetworkProviderForFrame::CreateURLLoader() with
   GetSubresourceLoaderFactory() which returns a
   network::SharedURLLoaderFactory.
 - Make blink::LoaderFactoryForFrame::CreateURLLoader() call the new
   method to get a network::SharedURLLoaderFactory, and create a
   blink::WebURLLoaderFactory using Platform::WrapURLLoaderFactory().
 - Introduce Platform::WrapURLLoaderFactory(
   scoped_refptr<network::SharedURLLoaderFactory>).

This CL should not introduce any behavior change.

Bug: 1413912, 789857

Change-Id: I44343eaceda6d308924db5bc75de8385ec01c4c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4211117
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102996}
2023-02-08 23:24:53 +00:00
63645b4c44 Refactor touch emulator custom cursor code
This is a precursor CL before forbidding access to
`ui::Cursor::image_scale_factor()` for non-custom cursors.

Update TouchEmulatorTest.CursorScaleFactor to not check the scale factor
when it's disabled, and instead just check that a regular pointer cursor
is used.

Additionally, TouchEmulator is updated to simplify the code to load its
custom cursor.

Bug: 1149906
Change-Id: Ic44dc5d3975047240f66ce73183ee110a79a8aba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4215436
Reviewed-by: David Bokan <bokan@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1102991}
2023-02-08 23:15:16 +00:00
67abd5a874 Replace Attribution Reporting DB migration presubmit with static asserts
The combination of existing unit test coverage for the exact DB schema
and these new static asserts ensures that the DB version number is
updated properly without the need for a noisy presubmit.

Change-Id: I206a4da41bcd57e6fea2687e8e0d68caadb904f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232359
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102983}
2023-02-08 23:03:15 +00:00
7c7f587292 win: add comment about UiaRaiseActiveTextPositionChangedEvent
MSDN documentation says UiaRaiseActiveTextPositionChangedEvent is
supported in Win8.1 onwards, but it turns out that some Win10 versions
of uiautomationcore.dll don't have it. Adding comment to code so no one
else tries to remove the dynamic function call.

Bug: 1408307, 1413076
Change-Id: If1e54feae9dd05873018effe6577612edb4ae75d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4234082
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Reviewed-by: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102982}
2023-02-08 23:02:25 +00:00
6ca513e090 Improve --log-file selection and passing to children on Windows
1) Small sandbox change to only add log file rules in one place so
the gpu process only gets a rule once.

2) Sandbox now gets to assume log files are absolute paths, because
the logging infrastructure in logging_chrome.cc now ensures an
absolute path is provided (on Windows).

3) The gpu process would choke in a non-obvious way if a
'--log-file=foo.log' was provided. This now results in the default
log file being used (and an error message).

4) Other invalid paths such as --log-file=.\out\foo.log now turn
into the default chrome_debug.log in all processes - this is probably
more helpful than crashing or only logging in half of the cases.

Tests are updated to expect absolute paths on Windows.

Bug: 1402641
Change-Id: I5177e7b89eca5daafacd4b6b92d7225ab53b4052
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4153432
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: David Bienvenu <davidbienvenu@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102980}
2023-02-08 23:00:55 +00:00
55c9cdb672 Remove logging statement and stale todo from OnDidRunInsecureContent
Bug: 1411825
Change-Id: Icd300d6493016f47ebfb322bc9121f72e58502d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4234079
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Carlos IL <carlosil@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102946}
2023-02-08 22:03:11 +00:00
33e4ae6907 Add slot=selected-value support for <selectmenu>
We decided to support this in OpenUI:
https://github.com/openui/open-ui/issues/657#issuecomment-1414262186

This patch also adds a test for ::part(selected-value) which as far as I
can tell was not tested before.

Bug: 1121840
Change-Id: I90b18d12249872239bd41e1be460ed46176fd17b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4220472
Auto-Submit: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102933}
2023-02-08 21:54:47 +00:00
c1108a30eb Extract helper for running Attribution Reporting DB migrations
The helper handles transactions and setting version numbers.

Change-Id: I0865aa79363455c155f9b8c8392ead695a013a7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4233403
Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102921}
2023-02-08 21:47:56 +00:00
fa289a3a56 FS: Ignore opaque origins in FileSystemURL::Comparator
Follow-up to https://crrev.com/c/4122683

This fixes the getUniqueId method, which relies on existence checks in
a map of FileSystemURLs that would incorrectly fail for files differing
by only the nonce of their FileSystemURL's opaque origin.

Bug: 1342961, 1396116
Change-Id: I3fb704560b8a86090feed725c4802a2f2a6f004d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225992
Commit-Queue: Austin Sullivan <asully@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102919}
2023-02-08 21:46:39 +00:00
4908f71087 [a11y] Added regression test for NoTreeID crash bug fix
This CL adds a test for CL:4218300 which fixed bug
https://crbug.com/1405036. The test is reusing an already existing HTML
test page since for the purposes of the bug and fix, the web contents
do not have an impact.

Bug: 1405036
Change-Id: I7ca3ce5fa23b2585653cb2c2d64c9a67bc5c65b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4226372
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1102911}
2023-02-08 21:42:04 +00:00
8b65b88e9b [ios] Adjust bundle name to match existing unittests
Code signing is required to run on a real device and using
a common name for all unittests prevents extra churn.

Bug: 1411704
Change-Id: Ief583cccba126f35eb1ed2a208cf243956509ba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4233397
Reviewed-by: Ali Juma <ajuma@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102902}
2023-02-08 21:37:18 +00:00
f2f9dc4e45 Change simulator output to the interop test format
This also adds success debug reports to interop test.

Bug: 1412810, 1412118
Change-Id: I682683bf7243ce0498a4f7ef717c2cfc96d43a0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4233400
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102897}
2023-02-08 21:33:58 +00:00
ecd2c98c18 Keep RenderFrameHostImpl::agent_scheduling_group_ a base::SafeRef
Given the exploration done in crbug.com/1297030, we found that
RFHI::agent_scheduling_group_ being a SafeRef protected against possible
UaFs where Render*Impl objects can live longer than
RenderProcessHostImpl/AgentSchedulingGroupHost, and the suggested we
landed on was that we should keep this member a SafeRef to ensure
further protection.

Change-Id: Icdd6401dfa8800a60d0c3b66ab347ca45c32ece2
Bug: 1297030
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4226418
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102872}
2023-02-08 21:18:52 +00:00
060cb95ebc NavigationThrottle::WillCommitWithoutUrlLoader
Currently, NavigationThrottles attach only when a URLRequest will be
created, allowing throttles to participate in the network request
portion of a navigation. However, for navigations that will immedaitely
commit because no URLRequest is needed, it is impossible to throttle
the navigation. Navigations that immediately commit include
about:blank, about:srcdoc, and most* (see below) same document
navigations.

This CL introduces a new NavigationThrottle callback,
WillCommitWithoutUrlLoader. WillCommitWithoutUrlLoader is called only
in the immediate commit case (when no other NavigationThrottle
callbacks will be called), and allows the NavigationThrottle to defer
or cancel the navigation, as any other callback does.

Currently, no NavigationThrottles use WillCommitWithoutUrlLoader, but
it will be used by a new throttle that will be introduced in
https://chromium-review.googlesource.com/c/chromium/src/+/4092862.

* Some same document navigations are committed synchronously in the
renderer process, and the browser process is only told about the navigation after the fact, so we can't throttle them. Those
navigations are renderer-initiated non-back-forward same-document
navigations. WillCommitWithoutUrlLoader can intercept all
browser-initiated same-document navigations, as well as
renderer-initiated back-forward same-document navigations.

Bug: 1067613, 1371580
Change-Id: I7066e69bee5e891c9aec1b79c8c266e011f726ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4210858
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102862}
2023-02-08 21:13:07 +00:00
73cb3be16d Raw AAC support in MF Audio Encoder
Before this change MF Audio Encoder would only emit ADTS.

Bug: 1407013
Change-Id: Ic63d75bb18e1b80416ce756458ce763b525a3b4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4226559
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102860}
2023-02-08 21:11:58 +00:00
2cfc0a0eb5 DCHECK when default action is triggered on node which has none.
There is nothing in our code preventing from running the default action
on an accessibility node, even when that node has the kNone default
action set. Some ATs even relied on this behavior.

We add a DCHECK so we can detect cases when this is happening, address
them individually, and finally stop exposing default actions on nodes
that haven't them.

Bug: 1370076, 1379347, 1382034
Change-Id: I75e08867695f61d1358dc9855a446d971f748516
AX-relnotes: no user-facing changes.
Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4098912
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1102815}
2023-02-08 18:33:12 +00:00
93863c4571 [FLEDGE] Move add ad beacon maps calls to InterestGroupAuctionReporter.
Previously, the AdAuctionServiceImpl would wait until the
InterestGroupAuctionReporter was complete, and only then pass ad
beacon maps to the FencedFrameReporter, which fenced frames use to
trigger event-based requests.

This CL moves those calls into InterestGroupAuctionReporter, which now
also builds the FencedFrameReporter. The calls are also made as soon
as each reporting script is complete, so that beacons are sent earlier.

Bug: 1410791
Change-Id: I42335aaa783cbeb14c361aba22b0d6d68ab8df3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4226651
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Shivani Sharma <shivanisha@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102814}
2023-02-08 18:30:25 +00:00
c73310c7a4 Abort FPS DB migrations if version bumps fail
Otherwise, it's possible for the migration to be partially successful,
which could result in crashes during subsequent use.

Change-Id: I72d961ed0795281cd66bd9d7750213391f5672da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4233084
Auto-Submit: Shuran Huang <shuuran@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Shuran Huang <shuuran@chromium.org>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102804}
2023-02-08 18:10:52 +00:00
2173d6e6c4 Reintroducing clearTrustTokens to devtools. Still needed for the Trust Token deletion in-browser.
Bug: 1408770
Change-Id: I49b23c6bde064dea941aef42299677e9a901c2ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4219296
Commit-Queue: Tim Huber <timhuber@google.com>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102780}
2023-02-08 17:27:47 +00:00
617bccced4 [Trigger Attestation] Move TriggerAttestation to the network service
Move the TriggerAttestation mojom struct to the network service for it
to be used directly by the network service, blink & browser.

This is a pure refactoring CL that has no intended behavior changes. You
can see CLs in the relation chain that make use of the mojom.

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


Bug: 1405832
Change-Id: I10282c5a81cae506696a3d757c7f9da5f3796705
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4203927
Commit-Queue: Anthony Garant <anthonygarant@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102762}
2023-02-08 16:54:27 +00:00
d672477633 [DirectSockets] Add host resolving to RestrictedUDPSocket::SendTo()
Bug: 1404938
Change-Id: I2cb002e21a9b91d45bee8b605c73a916c5ea332f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4218595
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Cr-Commit-Position: refs/heads/main@{#1102760}
2023-02-08 16:49:58 +00:00
d27d7dbd88 device/fido: support prf extension.
Add support for a `prf` extension at the CTAP level which mirrors the
WebAuthn-level extension of the same name. This allows authenticators
that don't support up=false probing to support PRFs.

See https://github.com/fido-alliance/fido-2-specs/pull/1373

Bug: 1106961
Change-Id: I0dc539d17e9d3d27044484d4c0cdbeebdd9d7f59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4215913
Reviewed-by: Martin Kreichgauer <martinkr@google.com>
Commit-Queue: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102756}
2023-02-08 16:45:37 +00:00
9a268bd8fb [Deprecations] (5) Replace browser_protocol.pdl enum {CHROMIUM}
Okay so hear me out. I know it looks like we're losing a bunch of type
safety, and we are, but in trade the codegen will go a lot smoother.
Once we codegen the path and translates a WebFeature into a deprecation
message, we won't need the two independent DeprecationIssueType enums
just to make sure the manual code path is clean. A generated codepath
can just pass around a string and it'll be okay. If this was just c++
code we might want to generate and keep the enum, but since we need to
pass this into browser_protocol.pdl trying to track an enum would just
make things confusing. As for the preference_api.cc codepath, that seems
like a one-off and we can treat it as such until we have a second
consumer. At that point we might want to formalize the codegen for that
path too.

TL;DR once we get to step 6 this will all get a lot cleaner, the mess of
strings is temporary.

This CL is part of a series:
(1) Add deprecation.json5 file
(2) Add existing deprecations to deprecation.json5
(3) Copy deprecation.json5 into devtools_frontend via update flow
(4) Update README to reflect devtools codegen
(5) Replace browser_protocol.pdl enum
(6) Codegen c++ code

Bug: 1411444
Change-Id: I1bb3882f3bf50b76879cad30c340f90d9687a73a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4226621
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102747}
2023-02-08 16:33:21 +00:00
6d8de36917 Abort Attribution Reporting DB migrations if version bumps fail
Otherwise, it's possible for the migration to be partially successful,
which could result in crashes during subsequent use.

Change-Id: I36e6a6554d7bc1920293d14aafffb318be989d04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232958
Reviewed-by: Nan Lin <linnan@chromium.org>
Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102746}
2023-02-08 16:31:02 +00:00
7a15c08fd5 Remove unused Attribution Reporting Python protos
The Attribution Reporting protos are used only for DB serialization by
a C++ class.

Change-Id: I37cf3c72380f42edf7bb38491398cb2740398ebb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232860
Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org>
Auto-Submit: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102741}
2023-02-08 16:18:55 +00:00
a92707221a Simplify Attribution Reporting filter data serialization
Change-Id: I12d934b07a9bfa72e23bbbd407e8e527f3f14286
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232957
Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Auto-Submit: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102730}
2023-02-08 15:52:06 +00:00
f7f5242323 Move attribution simulator code to content/browser/attribution_reporting
Bug: 1412810
Change-Id: I3c1a4bc745fd4a5889892f640c305d326f2e8447
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232898
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102728}
2023-02-08 15:46:33 +00:00
1c90430467 Collect non-reserved PA requests in browser process.
Handle PA requests of non-reserved event types in browser process. Only
winning bidders' such requests can be reported. Losing bidders' and
sellers' such requests will be ignored.
This CL only collects these requests that can be reported, and passes
them to AdAuctionServiceImpl. But triggering sending them will be
handled in follow up CLs.

Explainer:
https://github.com/WICG/turtledove/blob/main/FLEDGE_extended_PA_reporting.md#reporting-bidding-data-associated-with-an-event-in-a-frame

Bug: 1385549, b/262388618
Change-Id: I554656b595b6ee0460986e36f552590246e92f19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4220191
Commit-Queue: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1102725}
2023-02-08 15:44:04 +00:00
2456aa8c38 Fix SW checksum update happens twice when ChecksumUpdateTiming::kAlways
This is a follow-up CL for the parent CL[1] and the discussion in the
other previous CL[2]. Currently the checksum can be updated twice, and
it hits DCHECK when ServiceWorkerCacheWriter runs with the
ChecksumUpdateTiming::kAlways option and there is an update in SW
scripts.

Specifically, that case would go with the following scenario.

1) SW resources are stored, but sha256 checksums in the database are
empty.
2) The update check runs with the ChecksumUpdateTiming::kAlways option to
update the sha256 checksum.
3) ServiceWorkerCacheWriter finds a difference between cached data and
data from the network, then checksum->Update is called twice in
`MaybeWriteData` and `WriteDataToResponseWriter`.
4) ServiceWorkerCacheWriter instance is moved and `GetSha256Checksum` is
called from ServiceWorkerUpdatedScriptLoader.

To solve this issue, this CL adds 1) the if statement to
`WriteDataToResponseWriter` to call checksum->Update only when
`ChecksumUpdateTiming` is `kCacheMismatch`. 2) delete the
ChecksumUpdateTiming DCHECK in `ServiceWorkerUpdatedScriptLoader` since
it can be both enum values. 3) unittest to check this scenario.

[1] crrev.com/c/4209712
[2] https://chromium-review.googlesource.com/c/chromium/src/+/4210872/comment/8d9915da_7b2be08d/

Bug: 1371756
Change-Id: I2ef0fa1a703a5a31690201174b42c6df68317ce5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4227397
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102720}
2023-02-08 15:38:45 +00:00
4c6ed35717 Update ServiceWorkerUpdateChecker to return sha256_checksums
This CL will expose an option to return calculated sha256 checksums from
ServiceWorkerUpdateChecker. This internally uses the
ChecksumUpdateTiming::kAlways option in ServiceWorkerCacheWriter and
return checksums if the update check result is kIdentical.
ServiceWorkerUpdateChecker manages multiple checksums generated by each
script.

In this CL returned checksums are still not used, it will be handled by
the follow-up CL.

Bug: 1371756
Change-Id: I7472eb7191d28784680fe853477e1802d6b0bd5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209712
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102716}
2023-02-08 15:34:15 +00:00
a56ce4e176 Add FindRegistrationForClientUrl related UMAs
This CL adds the following UMAs.

- ServiceWorker.FindRegistrationForClientUrl.IsCalledForNavigation
- ServiceWorker.FindRegistrationForClientUrl.SkippedMojoCall.OnNavigation
- ServiceWorker.Storage.FindForClientUrlInDB.ScopeCountForStorageKey

Bug: 1411197
Bug: 1375174
Change-Id: Iad7c4740568e3339688b5af3f28889f2bf61b0f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4227398
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102687}
2023-02-08 14:23:44 +00:00
be7d09a2ce webrtc-internals: move legacy stats handling to separate file
to improve separation between the "modern" stats code and the
one related to the legacy callback-based getStats variant.

Also clean up very obsolete parts of the code.

BUG=chromium:822696

Change-Id: If886cb039b810fa952b628c2f9fa83b3bd6e0acb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225433
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102676}
2023-02-08 13:57:37 +00:00
425ca808d4 [MediaCapture Extensions] Pass configuration change via Crosapi
This CL allows capture device configuration changes to passed from media
VideoCaptureDevice::Client to blink MediaStreamTrackImpl via Crosapi.

Future CLs will observe device configuration changes and inform
the VideoCaptureDevice::Client on the backend side and trigger
onconfigurationchange events on the renderer side.

Spec: https://w3c.github.io/mediacapture-extensions/#exposing-change-of-mediastreamtrack-configuration

Bug: 1409011
Change-Id: I343edce3bdbbb2f4e26922a65d3a9b9c0599125f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4183917
Auto-Submit: Eero Hakkinen <eero.hakkinen@intel.com>
Commit-Queue: Markus Handell <handellm@google.com>
Reviewed-by: Markus Handell <handellm@google.com>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@chromium.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102653}
2023-02-08 12:19:31 +00:00
32510ed18d Disable content_browsertest SendAllOnProcessCrash on Linux
Bug: 1382713
Change-Id: Iaabd944ac6e0bac4635ab87d9ecd195a47e357cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4231331
Owners-Override: Anders Hartvoll Ruud <andruud@google.com>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Auto-Submit: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102616}
2023-02-08 09:21:47 +00:00
b352a88cf4 Remove stale WebGL 2 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 200 --suite webgl2_conformance --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Fixed: 1239079
Change-Id: I3986db85a76c39b35a68b7970cf94e20139cee3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4230140
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
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>
Cr-Commit-Position: refs/heads/main@{#1102600}
2023-02-08 07:40:27 +00:00