0
Commit Graph

114059 Commits

Author SHA1 Message Date
294250dd48 More deep-const-correctness for base::SharedMemoryMapping subtypes.
The code touched here wasn't consistent in its use of const, but
generally used it in a shallow-const fashion where even vending write
access to a block of memory could be done via a const method.

This causes problems when trying to enforce stricter lifetime checks on
writable spans, because either the code gets confused about whether the
accesses are read-only (it tries to look for the constness of the
returned pointers and can't figure out what to do if things don't
match everywhere) or it thinks something unsafe or non-sane is happening
(write access to rvalues makes no sense, for example, but read access
might in the context of a short-lived call).

Instead consistently model deep constness, which is compliant with
Chrome's style rules on const and fixes all these issues. Mostly, this
means changing const members/ref args to non-const ones.

Bug: 372381413
Change-Id: I2735c52fbf0f32b813055cbb46f7c15b09eb025f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5939406
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Fred Shih <ffred@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1373012}
2024-10-23 23:14:39 +00:00
c3a27f4c2f AuctionProcessManagerTest consolidate SiteInstances in base class.
There were two subclasses creating their own SiteInstances. This
consolidates those calls into the base class instead, since there's no
real benefit to separating them.

Bug: 374253381
Change-Id: I1f32bcb0bac03685e2904e1e6fd5dc88a5a027fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5958008
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372996}
2024-10-23 22:45:06 +00:00
8002d42fd5 bluetooth: Remove implicit value copying during Mojo IPC
Update the Web Bluetooth Mojo interface to use the ReadOnlyBuffer type
so that the generated C++ bindings use base::span, which doesn't require
copying the GATT characteristic or descriptor value out of the Mojo
message just so that it can be put into an std::vector.

Right now in the write case the value still needs to be copied into a
std::vector in order to call into //device/bluetooth. Updating this
interface to use base::span can be done in a follow-up patch to remove
the now explicit std::vector constructor invocations.

Change-Id: I1f21e97ebf28ea38ddb49bed9e7500ee04809968
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954717
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372994}
2024-10-23 22:40:31 +00:00
8cf586bd64 AuctionProcessManagerTest move remaining environment setup to base class
This CL moves the SetBrowserClientForTesting() call,
StartIsolatingSite() call, and TestBrowserContext construction from
subclasses up to AuctionProcessManagerTestBase, further consolidating
test setup into one place.

Bug: 374253381
Change-Id: I5599288bde13002a54edd947be5be96a0e0c2e12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5958267
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372981}
2024-10-23 22:09:32 +00:00
7ff58e04b6 Add render-document-swap named trigger for Chrometto
This will be used as a start trigger for recording Chrometto traces,
which will only be uploaded if the navigation experienced a renderer
hang.

Bug: 40615943
Change-Id: I2b7df6c335692faef251f74ce235a8e1716988a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953177
Reviewed-by: Charlie Reis <creis@chromium.org>
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372973}
2024-10-23 21:56:49 +00:00
1924a27af3 [PEPC] Snapshot permission statuses at commit navigation
When <permission> element is added to the DOM, we'll use IPC to check
the permission status and it'll update when the IPC callback is
triggered. This might cause a flicker if the status changes from ASK
to GRANTED.

We propose to snapshot permission statuses and cache the statuses at
the execution context, outlined in: https://docs.google.com/document/d/1pfuiJ7BIdX0dxMzboYIOvPV1mFKQ3HE_11VQNeBJSCc/edit?resourcekey=0-9el74tCe5opJXh3CIPyPGA&tab=t.0#heading=h.8zmwced28dbp

Bug: 368238224
Change-Id: Ib319301d0b9bedb07502a09b4f030d3e40844ea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5905369
Reviewed-by: Thomas Nguyen <tungnh@chromium.org>
Commit-Queue: Thomas Nguyen <tungnh@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Auto-Submit: Thomas Nguyen <tungnh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372969}
2024-10-23 21:54:25 +00:00
ef8b158db9 Fix incorrect imports of blink into content & chrome
Importing blink mojo types into other directories that aren't blink causes imports of internal blink header files (WTF::String/Vector/HashMap). This can then be abused by the caller to create structures that it shouldn't have access to. This is preliminary cleanup for adding an enforcement to the blink mojo header files.

Change-Id: I0aa1e30f07f595023191af1c96cdf58a258dc118
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953880
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372961}
2024-10-23 21:49:38 +00:00
23cea31a5d Fix use-of-uninitialized-value error by ChildProcessData on MSan tests
MSan test failed after landing crrev.com/c/5932764 with the error
message: `WARNING: MemorySanitizer: use-of-uninitialized-value`.
```
Uninitialized value was created by an allocation of 'child_process_data' in the stack frame
```

Failure CI bot link: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/51310/test-results?q=ExactID%3Aninja%3A%2F%2Fcomponents%3Acomponents_unittests%2FContentStabilityMetricsProviderTest.BrowserChildProcessObserverUtility+VHash%3Aa09c171ea35b3b9e

The landed CL is not the root cause of the MSan test failure but
just uncovered the potential `use-of-uninitialized-value` issue because
`ContentStabilityMetricsProvider::BrowserChildProcessCrashed()` reads
`sandbox_type` which was not set in the existing test cases.

Promoted `sandbox::mojom::Sandbox sandbox_type` as std::optional since
it can be invalid (or unknown) for some cases, plus the mojom
Enum doesn't have any proper one for invalid cases. `sandbox_type` can
be a lhs-value currently or in the future. For example, https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/webui/sandbox/sandbox_handler.cc;drc=e6fc2038d73ef96ff47deda3146d94d25530e13b;l=47

Tests:
```
autoninja -C out\Default metrics_unittests
out\Default\metrics_unittests --single-process-tests --gtest_filter=ContentStabilityMetricsProviderTest.*

autoninja -C out\Default sandbox_unittests
out\Default\sandbox_unittests
```

Bug: b:368672525
Change-Id: I435f5a879b23f557d5b1456e3754366528ce8685
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5949437
Reviewed-by: Luc Nguyen <lucnguyen@google.com>
Reviewed-by: David Schinazi <dschinazi@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Sangbaek Park <sangbaekpark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372950}
2024-10-23 21:43:11 +00:00
7e0b89fa4a PA: prioritize assigning launched unbound processes
Launched processes will be ready to generate bids sooner.

Bug: 365528726
Change-Id: Ifec9330a94acba0df01194bbd92ce30957f3fa77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954464
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372947}
2024-10-23 21:41:07 +00:00
3751203e8b Allow overridden user agent in auction update url requests.
This update improves the fidelity of our auction requests by incorporating user agent overrides.

This is behind a feature flag that is off by default.

Change-Id: I13b2b6a14b4d92619edcdf2ca5bb2e67560a119d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5949605
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Youssef Bourouphael <ybourouphael@google.com>
Cr-Commit-Position: refs/heads/main@{#1372899}
2024-10-23 20:12:20 +00:00
5bb9d48b13 Clean up kDirectSockets flag in tests
The feature flag is on by default from M131.

Bug: 358327122
Change-Id: If3f83b6e8184018412b12c8daa0905f6df9a79de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5956399
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372891}
2024-10-23 20:06:39 +00:00
979418fe29 Revert "Video: Ensure Android report correct framerate and resolution support"
This reverts commit 5a9b8c0acd.

Reason for revert: https://crbug.com/374940921 -- somehow crashing WebRTC.

Original change's description:
> Video: Ensure Android report correct framerate and resolution support
>
> Similar to crrev.com/c/5850062, we should query a list of
> the max supported resolution and framerates instead of using
> only one. MediaCodec already provides the API for us to query
> the max supported framerate using a given resolution, so this
> CL changed to use that API, using a list of the possible
> resolutions to query the framerate, which could makes the
> framerate result accurate.
>
> Bug: 371247952
> Change-Id: I99c4e49cfe6a2680fddede2d414c3216150c6135
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943936
> Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
> Commit-Queue: Sida Zhu <zhusida@bytedance.com>
> Cr-Commit-Position: refs/heads/main@{#1371781}

Bug: 371247952
Change-Id: Ib9e64b549b29bc1538e6ab3a71851ecab6cb534f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5956141
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372856}
2024-10-23 18:55:15 +00:00
bda8b474d3 Revert "media: Remove MediaLicense* code and usage"
This reverts commit e307cce88c.

Reason for revert: will come up with a strategy and discussion for
handling privacy concerns regarding being able to delete MediaLicense
data.

Original change's description:
> media: Remove MediaLicense* code and usage
>
> This CL deletes a lot of the MediaLicense* code and usages of it from
> the codebase.
>
> OBSOLETE_HISTOGRAMS=No longer using the MediaLicense* code.
>
> Bug: 40272342
> Change-Id: I46a2d8bf53ca684467255b6e21e3cd7e1441c4c4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5904345
> Commit-Queue: Vikram Pasupathy <vpasupathy@chromium.org>
> Reviewed-by: Evan Liu <evliu@google.com>
> Reviewed-by: Evan Stade <estade@chromium.org>
> Reviewed-by: John Rummell <jrummell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1372190}

Bug: 40272342
Change-Id: I1cbb4669d932ec153b1aae59a6b5164a6afde2ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955369
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Evan Liu <evliu@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Vikram Pasupathy <vpasupathy@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372853}
2024-10-23 18:46:30 +00:00
7e25ce4c06 AuctionProcessManagerTests: Consolidate SiteInstance setup.
This CL introduces a ProcessMode enum to the AuctionProcessManagerTests
to distinguish the three modes of operation under test, and consolidates
the configuration for the three states in AuctionProcessManagerTestBase,
which takes the enum as an argument from subclasses.

In a followup CL, that enum will also be used to create the correct
type of AuctionProcessManager.

Bug: 374253381
Change-Id: Iefb85c7f7537da190f09c7f9e12cd1318c477037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954804
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372812}
2024-10-23 17:25:40 +00:00
96ea8fee51 [Fontations] Remove FreeType dependency from local font indexing
Local font indexing has moved to Fontations since M129. Now that this
ran for one stable release cycle, remove the previous FreeType
implementation and the respective flag.

Bug: chromium:349952802
Change-Id: Id4ba883204e24bb5142bc1112e41d32c5d366815
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952467
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372803}
2024-10-23 17:17:53 +00:00
652a3b6bec Add stylus handwriting event properties to ui::TouchEvent
The CL adds stylus handwriting event properties,
handwriting_pointer_id and handwriting_stroke_id, to
ui::TouchEvent. Both properties are essential for
communication with ShellHandwriting API to request
handwriting for a pointer and initiate the experience.

The handwriting pointer id is an unmapped pointer id
supplied by the OS. The handwriting stroke id is supplied by
the OS based on the pointer id. The browser calls
`GetHandwritingStrokeIdForPointer()` from
shellhandwriting.h to retrieve the id for the given pointer.

Both fields are intended to stay within the browser process
and not to be shared with other processes or used outside
stylus handwriting feature context.

Bug: 355578906
Change-Id: I7768586f9b5d6d4f2ee80923e64c5ccd18005da8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5912139
Reviewed-by: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Yaroslav Shalivskyy <yshalivskyy@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1372776}
2024-10-23 16:45:55 +00:00
67ca7eaec2 Clean up AttributionDataHostManagerImpl
- Use forward declarations where possible
- Use more concise/precise local variable names
- Reduce local variable scope
- Consolidate flat_map find/erase operations
- Remove obsolete field trial param
- Introduce helper methods/lambdas to reduce duplicated code
- Inline single-use anonymous-namespace functions
- Replace unnecessary iterator parameters with references
- Move optionals before dereferencing for better use-after-move
  detection
- Clean up includes and using aliases

NO_IFTTT=minor code reorganization

Change-Id: I2732d0fec920bc3bad1c725ae852a38c3d9ff4d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952148
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372766}
2024-10-23 16:39:25 +00:00
71a5df6134 Make content::AXTreeSnapshotterImpl a RenderFrameObserver
Make AXTreeSnapshotterImpl a subclass of RenderFrameObserver, and call
RenderFrameObserver::render_frame() to get access to the RenderFrame
pointer. Then AXTreeSnapshotterImpl does not need to manage a
RenderFrame pointer itself, which can then become dangling.

Fix lint errors along the way.

Bug: 371445200
Change-Id: I8a4726590ed49de2740d48b52201b3623590d68a
Low-Coverage-Reason: TESTS_IN_SEPARATE_CL need to fix the bug first, otherwise test will crash.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955671
Reviewed-by: Abigail Klein <abigailbklein@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372759}
2024-10-23 16:29:23 +00:00
afb31ba884 Fix and re-enable TransferSharedLastForegroundTime test
On some builders the death test was failing because an assert had an
unexpected message. Removed the death test: there's no need to test for
an invalid handle since it's blocked at the Mojo layer.

Bug: 375065072
Change-Id: I09d0882e9a207b5440d3018edf5b2db8ab579980
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953918
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Auto-Submit: Joe Mason <joenotcharles@google.com>
Cr-Commit-Position: refs/heads/main@{#1372758}
2024-10-23 16:24:14 +00:00
7b0751a750 [DNT] Only play cancel animation when the BeforeUnload dialog is shown
Before this CL, we run the cancel animation if the navigation is
waiting for the BeforeUnload message. This is very conservative as a
page can register a BeforeUnload listener but doesn't perform anything.

This CL changes the behavior, in that we only play the cancel animation
to bring the active page back if a BeforeUnload dialog is shown.

Cq-Include-Trybots: luci.chromium.try:android-12-x64-rel,android-12l-x64-dbg,android-13-x64-rel,android-14-x64-rel,android-15-x64-rel,android-pie-x86-rel,android-oreo-x86-rel

Fixed: 364694410
Change-Id: Idbe86b5ae5879965fd0559a60ebb47e5b82d3de7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5919513
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: William Liu <liuwilliam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372747}
2024-10-23 16:08:52 +00:00
3aef1d167c [DNT] Fix NavigationController raw_ptr during WebContents destruction
GetNavigationEntryScreenshotCache() asserts the frame tree is primary.
However during WebContents destruction, the frame tree is reset before
the animator, so the navigation controller (owned by the FrameTree) back
pointer is a UAF.

This CL adds a shortcut to destroy the animator as the "first" thing
during the WebContents's destruction. Then the animator can still
perform the clean up tasks while the navigation controller is still
valid.

Bug: 373898450
Change-Id: I0d793d536ca99700cf7f8c324f562131f2a480c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5948024
Commit-Queue: William Liu <liuwilliam@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372744}
2024-10-23 16:05:44 +00:00
ba04ed009c Add interest group browser tests for Trusted KVv2 signals
Add same origin and cross origin for both trusted KVv2 bidding and scoring signals.

Bug: 337917489
Change-Id: Ic01927e432575ed1b5c4578d1807819cf2b5e5f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5930645
Commit-Queue: Tianyang Xu <xtlsheep@google.com>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372731}
2024-10-23 15:44:46 +00:00
e2d214e066 Prepare AuctionProcessTests for more parameterization.
In particular, switch to using GetWorkletType() instead of GetParam()
in preparation for adding a second parameter.

Also rename GetParamInverse() to GetOtherWorkletType() and
GetPendingRequestsOfParamType() to GetPendingRequestsOfWorkletType().
Merge GetActiveProcesses() and GetActiveProcessesOfParamType() to a
single GetActiveProcessesOfWorkletType() method that takes an optional
worklet type.

Bug: 374253381
Change-Id: I3e9eeaf5dfa523542217f5bd148dbde548bac072
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953094
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372725}
2024-10-23 15:40:31 +00:00
dc45830c78 Remove unused APIs from ShellManager
Remove unused Layer attachment/detachment APIs from the Shell management
system. This includes:
- Removing forward declaration of cc::Layer
- Removing ShellAttachLayer() and ShellRemoveLayer() functions

These APIs are no longer needed as layer management is now handled
elsewhere in the system.

Bug: None
Change-Id: I7e161d7dbb70100b6e40c254b710d4f5adfbaf09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952671
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1372722}
2024-10-23 15:34:56 +00:00
b117363c8e Creates RenderInputRouterSupport with CompositorFrameSink's creation for input
handling on Viz.

This CL does the following:
* Hooks up creation of appropriate RenderInputRouterSupport* class to mirror
RenderWidgetHostViewInput interface implementation in Viz for a FrameSinkId.
This information is stored in FrameSinkMetadata structure.
* Adds traversal methods, namely Get(Parent|Root)RenderInputRouterSupport to
InputManager, allowing getting parent/root RenderInputRouterSupportBase* class
from a child frame. Added tests for the traversals.
* Refactors RenderWidgetHostViewInput interface and implements some additional
methods for the same interface in RenderInputRouterSupportBase.

Doc Link:
https://docs.google.com/document/d/1tRPUd11fuPcXxb2ep_kGYPahgv0OOlV7DvsGkbom7VA/

Bug: b:367695776, b:373888054
Change-Id: Ia61f1848abc0598f7f385a6b4d1202109ca3fa71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5941108
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Cr-Commit-Position: refs/heads/main@{#1372706}
2024-10-23 15:15:59 +00:00
9e29e38e73 Migrate AuctionProcessTests to TEST_P()
A couple of them were still using TEST_F, which works in parameterized
tests as long as you don't call GetParam(), but we'll soon be calling
GetParam() in all tests, whe we add a second parameter to control the
base AuctionProcessManager being tested.

Bug: 374253381
Change-Id: Ie04e820460bdd078f6ef7de1cac33a99b5f8aeea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954132
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372695}
2024-10-23 14:56:24 +00:00
5a878f82ed DevTools: remove AttachClientWithoutWakeLock
AttachClientWithoutWakeLock was added in crrev.com/c/2360070
but does not appear to be used anymore.

Bug: 161674018
Change-Id: I0fbee2a736ef0e4ddc97d489505508b4f3ef3476
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954266
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372646}
2024-10-23 12:56:45 +00:00
e14429a8f2 Remove stale trace_test 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 trace_test --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Bug: 329138770, 371949935
Change-Id: I00c692c2e22988127e9970186bd78264e4173591
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955372
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: 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@{#1372548}
2024-10-23 08:02:21 +00:00
d5a8a4e9a7 Remove stale screenshot_sync 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 screenshot_sync --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Bug: 324934210
Change-Id: I7c5cbedfb9ff01117917d984253c950d24933e97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5956107
Auto-Submit: chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com <chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1372542}
2024-10-23 07:50:04 +00:00
154e9fdc94 Remove stale WebGL 1 expectations
Autogenerated CL from running:

//content/test/gpu/unexpected_pass_finder.py --project chrome-unexpected-pass-data --include-internal-builders --remove-stale-expectations --narrow-semi-stale-expectation-scope --num-samples 300 --suite webgl1_conformance --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Bug: 1175371, 1490427
Change-Id: I4d91cc4d96bac9a82b6b0d276b20dfba774a2e94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955953
Auto-Submit: chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com <chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1372534}
2024-10-23 07:27:36 +00:00
2853276b2f Update some content/browser keyboard event handling
Apparently, blink handles key down and raw key down events the same way.
Some pieces of content/browser apparently should use blink-like logic but they do not.
This change tries to address it by adding missing key down handling.
Also it includes a necessary change outside of content/browser.

Bug: 40881497
Change-Id: Ic22435674d7054034a3a12d1d5b017248f5508c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5928666
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Mariusz Domżał <mdomzal@google.com>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372533}
2024-10-23 07:21:34 +00:00
30226f35ec Move some classes into the on_device_translation namespace
This CL moves following classes into the "on_device_translation"
namespace.
 - OnDeviceTranslationServiceController
 - TranslationManagerImpl
 - Translator

This CL should not introduce any behavior change.

Bug: 374631433
Change-Id: I58a469953abea7a585825a0fe6fc5afcf89420c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953006
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372530}
2024-10-23 07:09:42 +00:00
83318f5747 Build display_media_access_handler for Android
This is CL 2/? for Android media picking.

Bug: 352186941
Test: CQ
Change-Id: If2801bb3ec1e773d70cc9eb3fb8471194a8c7314
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5919605
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Eliot Courtney <edcourtney@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372525}
2024-10-23 06:38:27 +00:00
d024421bbe [FedCM] Pass filtered out accounts to UI behind a flag
The filtered out accounts are not filtered in the case where the user
just logged in to the IDP and there are no new unfiltered accounts. This
includes the case where all accounts are filtered out. On desktop, the
HoverButton is disabled, but the UI still needs to be updated. On
Android, the UI is not updated at all, but it is behind the flag.
Followups will implement proper disabled accounts UI on both.

Bug: 40945672
Change-Id: Ie436542d12b87b17c461102edfedad85066ecf83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5867640
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Nicolás Peña <npm@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372517}
2024-10-23 06:14:45 +00:00
96972b373a Disable flaky test: RenderThreadImplBrowserDeathTest.TransferSharedLastForegroundTime
Run History: https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_browsertests%2FRenderThreadImplBrowserDeathTest.TransferSharedLastForegroundTime

Bug: 375065072
Change-Id: Ib2a373f92b49793bc5d63d4675a8f2bf3541bced
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953526
Owners-Override: Minoru Chikamune <chikamune@google.com>
Commit-Queue: Minoru Chikamune <chikamune@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372515}
2024-10-23 06:01:57 +00:00
e9def0e3f5 PreloadingConfig: update default sampling rates
Bug: b/287509693
Change-Id: I7f51c5a4c3a3b8cad16a36eaff6452f279c3a857
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952668
Commit-Queue: Lingqi Chi <lingqi@chromium.org>
Auto-Submit: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372506}
2024-10-23 04:42:59 +00:00
0e8f81e43e content: Use last committed entry during cache eviction
Bug: 375051688
Change-Id: Ie684b68feb6ee0dc89cc34d3230bf1089720fc2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955570
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372487}
2024-10-23 03:38:10 +00:00
5c538543d1 Disable flaky test: RenderThreadImplBrowserDeathTest.TransferSharedLastForegroundTime
Run History: https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_browsertests%2FRenderThreadImplBrowserDeathTest.TransferSharedLastForegroundTime

Bug: 375065072
Change-Id: Ib0cebb98bd7448fa5f032872434b167410fcfb73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953364
Owners-Override: Minoru Chikamune <chikamune@google.com>
Commit-Queue: Minoru Chikamune <chikamune@google.com>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372478}
2024-10-23 03:03:27 +00:00
f690cb404c Fix an issue that downloads_by_guid_ map can contain nullptr
The issue is caused by an [] accessor.
This CL fixes the issue and DCHECK all places we reference items
in downloads_by_guid_

Change-Id: Ibf30111ef969d5e6d35f4a31dbcb1a0898267348
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955567
Reviewed-by: Siddhartha S <ssid@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372425}
2024-10-23 00:28:53 +00:00
3cb576d7b8 Use an unentitled helper for the GPU process when possible
When SwiftShader is not enabled for the GPU process, the GPU process has
no need for the `com.apple.security.cs.allow-jit` entitlement. It can be
run using a normal, unentitled helper app instead.

Bug: 374064153
Change-Id: Ia67e21d99b5fafddc8ddd16275e9b216e7053370
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952835
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Mark Rowe <markrowe@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372375}
2024-10-22 22:15:51 +00:00
a7a50474fa s/dailyUpdateUrl/updateURL/ in a few places
The older name is deprecated but still supported.

Bug:40258627,40264073

Change-Id: I33603eaf2d9a873d22dbb2aae95089e0680b6383
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953028
Reviewed-by: mmenke <mmenke@chromium.org>
Auto-Submit: Caleb Raitto <caraitto@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372357}
2024-10-22 21:59:31 +00:00
62bfc6514a TTS Engine Extension: Emit OnLanguageStatusRequest to extensions.
The approved API proposal:
https://docs.google.com/document/d/16C6iMB9lsnAZDKc6Ea2Ep-jZj23SOUgI5n62W-FI9gk/

Here is the relevant design doc: go/read-aloud-eng-design-phase3

AX-Relnotes: Reading mode for non-ChromeOS desktop Chrome browsers
emits an event that will cause it to receive a notification with the
status of a higher quality voice. Previously, this was a a no-op.

Bug: 360395015
Change-Id: I1562fc51219a890716bf795ac933383702c821d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925910
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Xiang Xiao <xiangxiao@google.com>
Commit-Queue: Eitan Goldberger <eitang@google.com>
Cr-Commit-Position: refs/heads/main@{#1372325}
2024-10-22 21:21:41 +00:00
51eb828535 Transfer scenario shared memory handles in DocumentCoordinationUnit
Following a suggestion by Nasko in https://crrev.com/c/5867574, this
handles performance scenario shared memory completely in the blink and
components/performance_manager layers, getting rid of a shim through
content/ and chrome/.

This will unblock a followup CL to attach the browser-side
StructuredSharedMemory region to ProcessNode instead of
RenderProcessHost, which is blocked by the content/ shim accessing it
synchronously on the UI thread. The cost is an extra IPC roundtrip on
process startup.

Includes a partial revert of https://crrev.com/c/5867574 that returns
mojom::Renderer::TransferSharedMemoryRegions to TransferSharedLastForegroundTime.

Bug: 365586676
Change-Id: I681a3c941661ebba7c10b7abaf54aa5c4e430a9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5949866
Commit-Queue: Joe Mason <joenotcharles@google.com>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Auto-Submit: Joe Mason <joenotcharles@google.com>
Cr-Commit-Position: refs/heads/main@{#1372300}
2024-10-22 20:51:49 +00:00
12a036755e Enforce Noopener on Cross-Site Blob URL Navigations
To align Chrome with WebKit behavior, Chromium will enforce noopener
on navigations to Blob URLs where the corresponding site is
cross-site to the top-level site performing the window.open.
This ensures that a null handle is returned when `window.open` is
performed regardless of if the navigation succeeded.

Design Doc:
https://docs.google.com/document/d/1Xk73RLlLgfVw1p2tYBGqlP7ROQxaMh6kxfusSMm9exM/edit?usp=sharing

Bug: 361751872
Change-Id: I62316cf979629f5be26bbec708c76057f1e2ad80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5887349
Commit-Queue: Janice Liu <janiceliu@chromium.org>
Reviewed-by: Andrew Williams <awillia@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Auto-Submit: Janice Liu <janiceliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372255}
2024-10-22 19:51:41 +00:00
7e675b750b Merge IsConnectedToXXX functions into one IsCapabilityActive function
This CL:
a. Move DeviceConnectionType into WebContents and rename it to CapabilityType
b. Merge all IsConnectedToXXX() functions into a single IsCapabilityActive() function
c. Rename OnDeviceConnectionTypesChanged() method to OnCapabilityTypesChanged().

Bug: 372836924
Change-Id: Ib8be8821dff459c3788aeeb0fc4921f3996ec069
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5938280
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Commit-Queue: Yifan Luo <lyf@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372240}
2024-10-22 19:19:07 +00:00
8e5d3d5f9c [Geolocation LHS] Add geolocation to web content observer
To show geolocation usage in the left-hand indicator. We need to expose
it to PageSpecifiedContentSetting.

In this CL, this usage information is exposed with the same method as
HID/bluetooth with the web contents observer.

Change-Id: I730547e07955cd07913c49e92abd6ce01bbde05d
Bug: 372836924
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5920698
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Elias Klim <elklm@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Yifan Luo <lyf@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372239}
2024-10-22 19:18:16 +00:00
f31debc4a7 Avoid copy constructing interstitial_html for ThrottleCheckResult
Avoid up to two duplications by moving into the constructor arg, and
them moving from the constructor arg into the member variable.

Change-Id: I2607e9efdf7cb8ae6b279ee06809d861a3c510bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5930497
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Nathan Parker <nparker@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372221}
2024-10-22 18:55:14 +00:00
622b01b42e [DNT] Added a feature flag to guard dump without crash statements
Dump without crashes can be noisy in stable. This flag will enable us to
turn it off and on in different versions of Chrome avoiding extra noises
while being informed about them happening.


Bug: 374365779, 373617224
Change-Id: Iee0536c303a571f962b1816667d2fbc67da8ff46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5950247
Reviewed-by: William Liu <liuwilliam@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Baran Erfani <baranerf@google.com>
Cr-Commit-Position: refs/heads/main@{#1372216}
2024-10-22 18:51:14 +00:00
88fa590116 Reland "[HitTestOpaqueness] Enable by default"
This reverts commit fffe2c8c47.

Reason for revert: We have fixed all known HitTestOpaqueness bugs
on M132 and M131, so we enable HitTestOpaqueness it by default
again.

The original CL (Revert "[HitTestOpaqueness] Enable by default")
has been merged into M130 (but not M131). We have also landed a kill
switch to disable HitTestOpaqueness on M130 via finch.

Original change's description:
> Revert "[HitTestOpaqueness] Enable by default"
>
> This reverts commit a56e352a2b.
>
> Reason for revert: There are several bugs, some fixed on ToT
> (crbug.com/348520453, crbug.com/367166494), some
> still need investigation (crbug.com/372722559). We need to unlaunch
> the feature and restart the experiment after all bugs are fixed.
>
> Original change's description:
> > [HitTestOpaqueness] Enable by default
> >
> > Also change status of FastNonCompositedScrollHitTest to stable to make
> > it merely depend on the status of RasterInducingScroll, to simplify
> > dependencies.
> >
> > Bug: 40062957, 40256365, 329115115
> > Change-Id: Ia675bf7a2e833f26f3c113bda12735317d218a07
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5824528
> > Reviewed-by: Philip Rogers <pdr@chromium.org>
> > Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> > Reviewed-by: Jonathan Ross <jonross@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1348709}
>
> Bug: 40062957, 40256365, 329115115
> Change-Id: Ibeeeed2eda9365c850c174ca0854bba9ba77855a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5941138
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
> Reviewed-by: Jonathan Ross <jonross@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1370123}

Bug: 40062957, 40256365, 329115115
Change-Id: I5545ded5322d6c0552868a28f12664eb6f1ee543
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5954707
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372207}
2024-10-22 18:40:30 +00:00
dfd71fcedd Suppress unsafe buffers warnings from the latest version of Clang
Bug: 374320451
Change-Id: Ie5e961ab00cb84f9094253bf715ca1e6e3d411db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5949519
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372197}
2024-10-22 18:31:45 +00:00