0
Commit Graph

110592 Commits

Author SHA1 Message Date
5ab2f29a86 OT integration code DocumentPolicyIncludeJSCallStacksInCrashReports
This CL implements the necessary code changes to integrate the origin
trial feature for including JavaScript call stacks in crash reports.
The collection process is now contingent upon the check within
the execution context.

The generated Feature can be enabled/disabled by the user or by field
trial, and the overridden state takes precedence over the origin trial.

combinations:
Document doesn't have OT token --> feature is disabled

Doc doesn't have OT token, and we provide
--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports
--> feature is enabled

Doc does not have OT token, and we provide
--enable-experimental-web-platform-features --> feature is enabled

Doc has OT token --> feature is enabled.

Doc has OT token, and we provide
--disable-features=DocumentPolicyIncludeJSCallStacksInCrashReports
--> feature is disabled


Bug: 40268201
Change-Id: Iaef0c18b7db23cc884acf379bb6c74cecd464492
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491178
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Issack John <issackjohn@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1299596}
2024-05-10 23:39:01 +00:00
c16c5e138a Create a pipeline from render frame host to VibrationManager
Design doc: go/crca-cspp-ping-vibration-api

Change-Id: I7b34c92559fcca9f650240b4b7afab3c76f9a7da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5490193
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Seung Jae Lim <andysjlim@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299589}
2024-05-10 23:30:00 +00:00
9d70da4c58 [PEPC] Make PEPC permission subscription take into account device status
The PEPC element needs to get the overall permission status including
the device status in order to correctly decide which text to present
to the user. This CL ensures that the PEPC observer will receive the
permission status including the device status, while not changing the
functionality for other observers. This is done by adding a new
parameter to the `AddObserver` call: `should_include_device_status`.

This parameter is trickled all the way down to the `PermissionManager`
where it is used when calculating the permission status for that
subscription only, whenever that is done.

*Reviewers*: This CL makes mechanical changes to many files, but the
only logical changes are:
* chrome_permissions_client.cc - implement OS device status interaction
for Mac
* components/permissions/permission_context_base.h - define new
`AlwaysIncludeDeviceStatus` function which allows the
`GeolocationPermissionContextAndroid` to keep its current functionality
* `components/permissions/permission_manager.cc` - use the new
`should_include_device_status` parameter to decide whether to include
the device status when getting the permission status.
* html_permission_element.cc - make the AddObserver call with
`should_include_device_status` = true

Fixed: 335834559
Change-Id: Ia8cf68010c9b596520a6b4c5fc61ad24577452f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5483406
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: David Song <wintermelons@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Thomas Nguyen <tungnh@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299563}
2024-05-10 22:24:39 +00:00
529e87c7dd Implement preventSilentAccess carveout for SAA autogrants
If the RP has executed `navigator.credentials.preventSilentAccess()`,
then SAA autogrants via FedCM sharing permission should not be allowed.

This implements https://github.com/explainers-by-googlers/storage-access-for-fedcm/issues/1.

Bug: 330574529
Change-Id: Ic4b131192b563edea07b5cd46157753e13517990
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5498772
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299551}
2024-05-10 22:01:50 +00:00
6bba9ae5d8 iwa: Ensure sandboxed processes can't be IsolatedContexts
This updates the IsIsolatedContextAllowedForUrl path of enabling
IsolatedContext to never allow sandboxed frames.
WebExposedIsolationLevel::kIsolatedApplication is already not inherited
by sandboxed frames. This gives the same behavior to Chrome Apps and
kiosk.

Bug: b/336945294
Change-Id: Ib75f9ac0d19d05105f957dac0af9b03825c5c170
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530400
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Andrew Rayskiy <greengrape@google.com>
Cr-Commit-Position: refs/heads/main@{#1299531}
2024-05-10 21:35:39 +00:00
7fb7ce92aa [PEPC] Add PEPC origin trial configuration
With this change, PEPC is now ready for Origin Trials on desktops and
also supports the emergency killswitch.

To resolve the circular dependency, we have removed the old base
features and have been using the generated Blink features. We now
generally use both the blink::features::kPermissionElement
and the Blink runtime-enabled features PermissionElement to enable PEPC
related features. See for more details https://docs.google.com/document/d/1s8ZhbbNBdYE6kGNdHWsRp_jXkyGKSU61LCv9DvtIH-A/edit?resourcekey=0-pcpbz-2TwKvIQSJ11TBfcQ

Bug: 335834653
Change-Id: I35f1cdfbb24a44c0db975cb0d2a09c30729a09c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522113
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Thomas Nguyen <tungnh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299512}
2024-05-10 21:02:21 +00:00
b52deb00c3 [FedCM] Add a prefix for custom parameters
That way they do not conflict with builtin keys
such as account_id or disclosure_text_shown.

I picked `param_` as the prefix. The underscore matches what
we use in other parameters like `account_id`.

Bug: 339457767
Change-Id: I68c778554514f94e9b59ef01ff5b12d4c55872bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5531106
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299492}
2024-05-10 20:40:57 +00:00
d917927fc2 [RealTimeReporting part4] Handles contributions on browser side.
Handles contributions collected from worklets in browser process.

Explainer: https://github.com/WICG/turtledove/blob/main/PA_real_time_monitoring.md

Bug: 337132755

Change-Id: I33aa0456c2a8a4657ad11d47e661da8a5732e3fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517450
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Qingxin Wu <qingxinwu@google.com>
Cr-Commit-Position: refs/heads/main@{#1299479}
2024-05-10 20:22:05 +00:00
4b477c86ed IDB: fix indexeddb-internals for sharded backing stores, take 2.
The mojo callback for the response to the idb-internals page was
executing on a bucket thread instead of the main IDB thread.

Fix this by using SequenceBound the way it's intended to be used
instead of passing a callback to the bucket context.

Bug: 337994998
Change-Id: I08757523b116e8c987853f9b04745b8efcf2f272
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528756
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299454}
2024-05-10 19:54:02 +00:00
4c4b20aed1 FSA Observer: Rename FSA ChangeType kUnsupported to kUnknown
This change renames the kUnsupported ChangeType enum entry to kUnknown.
In an upcoming CL we will use this renamed entry to fire an event when
the page resumes from BFCache.

Bug: 330500720
Change-Id: I9cd5093686ddac99f0941099572b4c3527476500
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491834
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Rahul Singh <rahsin@microsoft.com>
Reviewed-by: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299448}
2024-05-10 19:48:09 +00:00
f634343de1 Remove GPU six usage
Removes all remaining uses of the six module from //content/test/gpu
since everything should be on Python 3 by this point.

Change-Id: I0eade820431d8994c999704287da30820aa0af98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527428
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299436}
2024-05-10 19:20:27 +00:00
d1565b1d12 Add new parameter to CookiePartitionKey::FromNetworkIsolationKey
The current implementation of the Cookie partition key with the ancestor chain bit included can generate a cross-site key even when the site is the top-level site and should not have any ancestor. To address this, a new parameter, main_frame_navigation has been added to ensure that main frame's always create a same_site key.

The test coverage associated with this change is in linked CL https://chromium-review.googlesource.com/c/chromium/src/+/5512042

Bug: 339410000
Change-Id: Ifcaff07afec4d7ff48e99b5422e19ed7a0940c76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526495
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Auto-Submit: Aaron Selya <selya@google.com>
Reviewed-by: Brianna Goldstein <brgoldstein@google.com>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Aaron Selya <selya@google.com>
Cr-Commit-Position: refs/heads/main@{#1299420}
2024-05-10 19:06:15 +00:00
42390c5321 ContentSettings: Remove string provider name
Replace string provider name with ProviderType enum and remove
conversion methods.

Bug: 40538766
Change-Id: I7415f71c30b8d9c5cd0df6b7e3e89b976ac0c7d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5510302
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Kevin Graney <kmg@google.com>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Sergio Collazos <sczs@chromium.org>
Reviewed-by: Jonathan Njeunje <njeunje@chromium.org>
Commit-Queue: Sean Topping <seantopping@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299408}
2024-05-10 18:51:57 +00:00
92f8283ba8 Clean up AttributionDataHostManagerImpl
- Remove unnecessary copies, misleading moves, and conversions
- Remove unnecessary bound callback parameters
- Merge redundant code blocks
- Simplify error handling
- Remove unnecessary std::optional wrapper of info header

This contains no intentional user-visible behavioral changes.

Change-Id: I34adf04dd56f0d1ce709bceff95c9f0cef0194ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527767
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Anthony Garant <anthonygarant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299394}
2024-05-10 18:42:10 +00:00
492d39da83 Use the ReceiverId from IndexedDBBucketContext as the client token in IndexedDBConnection
`IndexedDBConnection` maintains a token identifying the client that
initiated the connection to support certain BFCache scenarios.
See https://chromium-review.googlesource.com/c/chromium/src/+/5203165.
This token is currently generated by
`IndexedDBClientStateCheckerFactory` based on the RFH ID of the client.

However, `IndexedDBBucketContext` - which implements the `IDBFactory`
interface and creates the IDB connections - can uniquely identify the
client by the `ReceiverId` of the mojo call creating the connection.
Hence, this CL passes the `ReceiverId` returned by `current_receiver()`
as the `client_token_` to `IndexedDBConnection`.

This CL has no functional changes and will help with further planned
work in this space, as discussed in the linked bug.

Bug: 336960312
Change-Id: Ibd10331f8034db5b076f8c9525dde027e55cb505
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529157
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Brad Triebwasser <btriebw@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Auto-Submit: Abhishek Shanthkumar <abhishek.shanthkumar@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1299392}
2024-05-10 18:40:58 +00:00
c9d50975b3 FLEDGE: Add * to navigator.protectedAudience.queryFeatureSupport
...which returns all feature detection knobs in a single object.
This makes it easier to incorporate new features for people running as
component auctions, as they don't need cooperation of the top-level
party for each feature they want to test, and can just take the entire
config as part of their RPC.

Bug: 332913415
Change-Id: I15c2abc410424db93a872dae2646fa2e2a6cfa05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530182
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299357}
2024-05-10 17:42:13 +00:00
4251b33a66 [a11y] Computes accessible name for svg with image elements.
This change fixes a bug where previously svg
images with a nested title tag were not using the
text from the title as the accessible name, as per
the rules for svg naming defined at:
https://www.w3.org/TR/svg-aam-1.0/

The previous algorithm groupped html images (<img)
and svg images (<image), in  one step to compute
the accessible name by trying to read the alt
attribute. For html, this is correct; However, for
svg images trying to read the alt attribute is
wrong since there is no alt attribute, and the
way to provide accessible descriptions is through
aria.

Test: DumpAccessibilityTreeTest.NameSvgFromContent
AX-Relnotes: n/a.
Bug: 331902964


Change-Id: I0fbd06f4253531b8aaf4bc26f8be9d24df641e7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515384
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Lucas Radaelli <lucasradaelli@google.com>
Cr-Commit-Position: refs/heads/main@{#1299329}
2024-05-10 17:08:04 +00:00
6bac3de27a [Views AX] Prefer base::SingleThreadTaskRunner in BAM_mac.mm
In preparation of moving BrowserAccessibility* and
BrowserAccessibilityManager* to the ui/ layer, I am working to move
anything that can be done ahead of time.

This change removes yet another content layer dependency from
BrowserAccessibilityManagerMac.

I have tested locally and found no difference in VoiceOver's
announcements of live region changes.

Bug: 40672441
Change-Id: I4ed6a3df0c5afd00c415631d9806087682733230
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522879
Commit-Queue: Jacques Newman <janewman@microsoft.com>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1299323}
2024-05-10 17:02:47 +00:00
9d3dca5c1d Don't show download interstitial for inline pdf page
For CCT, it will show a download interstitial page if another app
launches a URL that resolves to a download. For inline pdf, we
shouldn't do that. This CL exposes the MIME type from the native
NavigationHandle to its java  counterpart, so we can determine
whether the interstitial should be shown.

Bug: 339511978
Change-Id: Ic317c9bcbab1d6538486af2143f1a5278df225c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529698
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Lijin Shen <lazzzis@google.com>
Reviewed-by: Shu Yang <shuyng@google.com>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299309}
2024-05-10 16:51:51 +00:00
a5eb18f48f Avoid crashing when setAttributionReportingTracking is enabled twice
Previously this method crashed due to a DCHECK in
base::ScopedObservation::Observe when an observation was already in
effect.

Bug: 339141101
Change-Id: Ie9e202c121fd7dff885c60981cd759a3206f8959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527382
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299294}
2024-05-10 16:35:59 +00:00
7c50c1d6ff Add a histogram for filtering ID and custom max bytes usage
Will allow us to understand the frequency with which this new feature is
used. Only recorded when the feature is enabled.

Bug: 330744610
Change-Id: I7f1af74e787741de6c361e81dd04866d69a68940
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5518253
Reviewed-by: John Delaney <johnidel@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Auto-Submit: Alex Turner <alexmt@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299269}
2024-05-10 15:46:41 +00:00
edfafdd600 vt: Add VT-only option for browser controls early resize
This CL adds a flag guard to enable the mechanism from
https://crrev.com/c/5366846 only if the current page has a
view-transition opt-in.

That CL looks like it causes a non-trivial regression in CLS so it's not
clear it can be shipped yet. Since same-origin view transitions are
currently enabled to ship for M126, this gives us an option to enable
the behavior only in cases where a view transition is likely to take
place.

Bug: 41490049,332331777
Change-Id: I6811379c2b83e6de09f65a27ea468d1f17201986
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526681
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299265}
2024-05-10 15:44:13 +00:00
5d286ae4b4 Check switch value of kDisableGpuShaderDiskCache before calling RemoveDiskCacheHandles()
On Android Platform, kDisableGpuShaderDiskCache is set to be true by default, so there is no need to do RemoveDiskCacheHandles(). If we do  call RemoveDiskCacheHandles(), there's a chance accidentally triggering the gpu process to launch if it does not exist, because RemoveDiskCacheHandles() method will call delegate_->EnsureGpuHost().

Bug: dawn:549
Change-Id: I598f9ccfa81ba99591c37c0639b73ffef0493f0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528833
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299259}
2024-05-10 15:40:35 +00:00
5390519e55 Serialize Mac ASan test
Serializes ContextLost_WebGLContextRestoredInHiddenTab on Mac since it
is flaky on Mac/ASan.

Bug: 338574390
Change-Id: I51ffb2caef406fb81163d8f2fcd4170b5a765a89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530464
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299246}
2024-05-10 15:18:28 +00:00
f6403bb239 Fix render URL replacements crash.
This fix makes it so that if a replacement is made that makes the
new URL invalid, the renderURL will remain the original non-replaced
version.

Added tests to:

- Ensure this works properly.

- Verify deprecatedReplaceInURN works similarly.

- Verify validity of hostname replacements.

- Verify chaining deprecatedReplaceInURN with deprecatedRenderURLReplacements

- Same changes to component auctions.

Bug: 338236823
Change-Id: I0840e8458859e7652336b0c3baee6cfb8473862d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517864
Reviewed-by: Orr Bernstein <orrb@google.com>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: Youssef Bourouphael <ybourouphael@google.com>
Cr-Commit-Position: refs/heads/main@{#1299231}
2024-05-10 14:53:06 +00:00
1f79b0d626 Protected Audience: enable WAL by default
Write ahead logging improves performance of LoadGroupsTime at the 99th percentile.

Change-Id: I74cf19de5e0d072faf81a951dbacd902b9c992da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530184
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299223}
2024-05-10 14:48:07 +00:00
634234d290 [Device Posture][Viewport Segments] Fix Origin Trial not working correctly for CSS APIs.
This patch fixes the issue where CSS APIs are not properly enabled when
the origin trial token is valid. The main issue was that
style_environment_variables was not passed the current execution context
and thus couldn't enable the APIs correctly (failing in the DCHECK for
viewport segments environment variables).

This patch makes the tests a lot more robust by making sure the CSS Variables
do resolve. In order to achieve this we need to be able to emulate the posture/segments
and the tests are now doing that. To avoid the tests depending on
DevicePostureProviderImpl, WebContentsImpl interface was modified.

Bug: 339681878
Change-Id: I1e3da4e6588492530b36c05e1780e5a1f9b5d7f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530236
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Alexis Menard <alexis.menard@intel.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299211}
2024-05-10 14:27:33 +00:00
347b2916cf Updating XTBs based on .GRDs from branch main
Change-Id: I158adef0c5244f88813d4403ae2503c91f5a90c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528860
Auto-Submit: Ben Mason <benmason@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1299204}
2024-05-10 14:09:32 +00:00
5be31726da Prerender: Remove deprecated version of embedder_blocked_hosts
The embedder_blocked_hosts associated with kPrerender2 flag is
superseded by the new version associated with
kPrerender2EmbedderBlockedHost flag. This CL removes the unused old
version.

Bug: 41481880
Change-Id: I20f778c76f9420a876a5a273159673ffe98be88e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529194
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299191}
2024-05-10 13:13:45 +00:00
e23b1a0d01 Update PasteActionModeCallback delegate to controller [3/x].
Make [PasteActionModeCallback] use [SelectionPopupControllerImpl] as the delegate to create the menu instead of a new [SelectionActionMenuDelegate] created on the fly.

[SelectionPopupControllerImpl] already implements [SelectionActionMenuDelegate].

Bug: 320643289
Change-Id: I9f4f445125e1a336038cdf66645f96afe8fbcd9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526597
Commit-Queue: Zakarie Yaris <yaris@google.com>
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299188}
2024-05-10 13:11:47 +00:00
b5aa3efc68 Expose keyboard-lock and pointer-lock in the Permissions API
Allow querying for the permission grant state for the two APIs.

Bug: 333988290
Change-Id: I543f08729ac32c3b3d305b0d7cf6c46863f71166
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5481227
Reviewed-by: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299186}
2024-05-10 13:10:36 +00:00
092b2ba5cd Remove FloatingPastePopupMenu + move show and hide methods to controller [2/x]
The [PasteActionModeCallback] handles the life cycle of the "paste" menu. Previously it was combined with the general code of the pastePopup menu in [FloatingPastePopupMenu].

Since the "paste" menu now uses [SelectionPopupControllerImpl] as a delegate directly instead of its own interface (which eventually used [SelectionPopupControllerImpl]), we have also moved the methods that  hide and show the paste menu into the controller (making [FloatingPastePopupMenu] class redundant) and only left the callback in the file (which would also be moved into the controller in next CL).


Bug: 320643289
Change-Id: I59b22635725d6323b9ad5d905cef1c84318fb504
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522217
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Zakarie Yaris <yaris@google.com>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299159}
2024-05-10 10:28:12 +00:00
5dee5d14da Update the FloatingPastePopupMenu delegate [1/x]
first in a series of changes to merge the FloatingPastePopupMenu functionality into SelectionPopupControllerImpl. Also see CL: https://chromium-review.googlesource.com/c/chromium/src/+/5344269

Bug: 320643289
Change-Id: Ice66d33a03c785949f4365d1a11292a39909351e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522216
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Zakarie Yaris <yaris@google.com>
Cr-Commit-Position: refs/heads/main@{#1299152}
2024-05-10 09:48:56 +00:00
02a2b16822 Move the BroadcastReceiver management (registering and un-registering) the the BG
This is a newer version of https://crrev.com/c/5367078, the issue was
that SequencedTaskRunner doesn't make sure that the tasks run on the
same thread hence using SingleThreadTaskRunner instead.

 This is currently behind a feature flag disabled by default.

Bug: b:325352920
Change-Id: I64bfc7f0e7c640f7670f3aee1d209ac51bc99174
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5505597
Commit-Queue: Sayed Elabady <elabadysayed@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299147}
2024-05-10 09:29:09 +00:00
eb3dbd2e4e 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 300 --suite webgl2_conformance --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Fixed: 1521117
Change-Id: If72df060c3d6755c83e175e677b444f7ac1e9fd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530873
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@{#1299116}
2024-05-10 08:15:13 +00:00
1903eaf9d1 Remove stale context_lost 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 context_lost --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Bug: 338071088
Change-Id: I7c749d8211e5cae55721bc1231c3f894f1e6a7bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528804
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
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>
Cr-Commit-Position: refs/heads/main@{#1299097}
2024-05-10 06:45:44 +00:00
705060d448 [v8] Clean up no_alloc_direct_call_for_testing
V8 fast calls can now allocate objects, trigger GC, call back to
JavaScript, and throw exceptions. Therefore there is no need anymore for
tests that check that API functions called by fast V8 calls don't do
these things.

Bug: 41492790
Change-Id: I4ab690b872eb890e46f5a7d24c2e7a96d4c505f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526133
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299078}
2024-05-10 05:06:00 +00:00
2cf8572c3f Remove dead code for IPC channels
We no longer use the code path to add IO-thread associated interfaces
directly to an IPC::Channel, except for some BrowserMessageFilter code
which also turns out to be dead code.

Delete this stuff.

Bug: None
Change-Id: Iad964273134fb953562c3829359117eee11179e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530315
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1299048}
2024-05-10 02:46:45 +00:00
608f895baf Remove SetHeaderPolicyForIsolatedApp.
This is the one remaining mutator in this class. It is removed by adding an optional base_policy paramter to CreateFromParsedPolicy with the policies being combined at construction time.

Change-Id: I8b36c7e5f2125396cdf6bd8174f0612c3926c13b
Bug: 338183241,40228997
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5481147
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Auto-Submit: Fergal Daly <fergal@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299024}
2024-05-10 01:06:28 +00:00
54153e1549 Remove unused dest_is_restore param in SiteInstance creation
RenderFrameHostManager::DetermineSiteInstanceForURL does not use its
dest_is_restore or dest_is_view_source_mode parameters. Clean these up.

Test: No behaviour change
Bug: 40202433
Change-Id: I914d3594ecec26a5fd69877c50a9fc857de656a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530469
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299003}
2024-05-10 00:37:02 +00:00
d4cfff868d [a11y] Pass caret blink rate to webviews
Caret blink rate wasn't being sent to the files "save-as" dialog. This
change makes sure that the renderer preferences are updated to include
caret rate whenever the caret rate changes in NativeTheme.

See bug for video of this working (and video of it failing in the
initial description).

Test: Manual
Bug: b:339459013
Change-Id: I04e1922777666e3877c8d8a49123722cf58400dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529700
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298939}
2024-05-09 22:40:18 +00:00
6f2efbca5f Use absl::Cleanup in //content
absl::Cleanup is a helper to run arbitrary code when the absl::Cleanup
object goes out of scope, which is useful for executing cleanup code or
ensuring something always runs. The current //base equivalent is
base::ScopedClosureRunner, which executes a base::OnceClosure when the
runner object goes out of scope.

Compared to base::ScopedClosureRunner, there are several benefits to
using absl::Cleanup:
- works with capturing lambdas, which are often much more concise than
  base::BindOnce()
- requires no heap allocations
- less impact on binary size since absl::Cleanup instantiates fewer
  templates

This CL is part of a project-wide cleanup to migrate to absl::Cleanup
where appropriate. The general criteria for migrating usages of
base::ScopedCLosureRunner:
- The cleanup scoper must not escape block scope, e.g. it is not
  returned from the function, passed to another function, or bound into
  a callback.
- The cleanup scoper's type does not need to be named, e.g. the scoper
  construction can use CTAD:
    absl::Cleanup run_at_exit = [] { RestoreSettings(original); };
  Note: having to write absl::Cleanup<decltype(lambda)> as a type is
  often a sign that absl::Cleanup is not a good fit for how the code is
  currently structured.
- The cleanup scoper is not simply running a base::OnceClosure.

Bug: 339492604
Change-Id: Id644c6a189081674b4d28814401f191f9d09d69f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530368
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298937}
2024-05-09 22:37:50 +00:00
4fc23fef39 [Fuchsia] Update expected_color test expectations
Disabled
ExpectedColor_MediaRecorderFromVideoElementWithOoprCanvasDisabled since
it's failing on astro.

Bug: 1417006
Change-Id: Ic0d988327a95aa8b1faddd2070e4b312ce9e89c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527427
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Zijie He <zijiehe@google.com>
Cr-Commit-Position: refs/heads/main@{#1298901}
2024-05-09 22:02:55 +00:00
df2363823e Remove set_show_popup_menu_callback_for_testing()
This can be replaced with a Mojo interceptor instead of plumbing a
bespoke test callback into RenderFrameHostImpl.

Change-Id: Ib1990a2f7fc34481f633965394f4d7081e3d58a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5525677
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298886}
2024-05-09 21:46:13 +00:00
07a5a8218b Suppress flake on Samsung S23 pixel tests
pixel_skia_gold_validating_test is flaking on Samsung S23 GPU bot. These
video related tests occasionally crash due to DCHECK in
CompositorFrameSinkSupport::DidPresentCompositorFrame(). Add
RetryOnFailure to suppress the failures until root cause can be found.

Bug: 339457781
Change-Id: I59fe8087602404c0fa77367d105ce8982015e617
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530202
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Saifuddin Hitawala <hitawala@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298883}
2024-05-09 21:42:58 +00:00
959a1ceca1 [Fuchsia] Skip failing WebGL conformance tests.
Bug: 1417006
Change-Id: Iaf3ae1ea65d9decdb45ce107180f45ca67802038
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530222
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Zijie He <zijiehe@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298880}
2024-05-09 21:40:12 +00:00
0916e7aab2 Improve Bidding and Auction request generation
Identify buyers that would not use all of their allocated space and
reallocate that space to other buyers. To accomplish this we calculate
the maximum serialized interest groups for each bidder. Then we
iteratively adjust the allocation so that bidders are not allocated
more space than they can use.

Bug: 332299012
Change-Id: Ifae52a26b8d730cf73f86942ee94a71dc4f2433f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5446064
Commit-Queue: Russ Hamilton <behamilton@google.com>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298877}
2024-05-09 21:34:19 +00:00
cd3494326e [FedCM] Disallow empty name and email in accounts response
Bug: 339678641
Change-Id: I357faba2116b254941833e0aaed41a2db5f9f685
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529788
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298859}
2024-05-09 21:02:46 +00:00
95305d27de Remove use of the pointer version of RandBytes, use span always
The pointer-based crypto::RandBytes() overload can't be removed until
nearby stops using it: https://crrev.com/c/5529443 will do this.

The pointer-based base::RandBytes() will be removed next.

Bug: 40284755
Change-Id: I72c79e23e120f988b091dd2576de180a1c60d2b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5514816
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298850}
2024-05-09 20:38:44 +00:00
da5b90c678 Add .ico file and change .rc to add an icon for content_shell on Windows
Makes it display the same logo as on Android and iOS in the taskbar.

Change-Id: I88fbe2eedcdb25be36e2964d23a365eba71a8984
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5505003
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298839}
2024-05-09 20:26:48 +00:00