0
Commit Graph

359 Commits

Author SHA1 Message Date
Abigail Katcoff
0e9e3108d6 Topics API: add new flag for Javascript API
Add the ability to ship the Topics API with or without the Javascript API. The default of the new flag is enabled, to match the current status.

Change-Id: I4b503f9978fd55e5af31b76241ba3a4e8f737a74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4566406
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Reviewed-by: John Delaney <johnidel@chromium.org>
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1150643}
2023-05-30 16:55:41 +00:00
Ryan Kalla
634d3c7e62 Add EnvironmentIntegrityService mojo interface
Add the EnvironmentIntegrityService mojo interface which will be used by
navigator.getEnvironmentIntegrity for renderer/browser IPC.

Add a stub implementation of EnvironmentIntegrityService interface in
the browser process.

Bug: 1439931
Change-Id: I5f641792f70eaf16103dfb9721330c296cb3e3f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4480690
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Ryan Kalla <ryankalla@google.com>
Cr-Commit-Position: refs/heads/main@{#1147498}
2023-05-22 21:59:52 +00:00
junwei
d4ed5a81ff WebNN: Define mojo interface of Web Neural Network API for IPC
There is a singleton WebNN service running in GPU process to
communicate with renderer process, every `ml` object in navigator will
bind a `WebnnContextProvider` message pipe with the `GetInterface()`
function of `BrowserInterfaceBroker`, it can create different
`WebnnContext` mojo interface mapping with `MLContext` WebIDL object.

This feature has undergone security review here [1].
There is a runtime flag to disable the WebNN GPU Context by default.
The CL is split from the big CL [2] to review easily.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1381569
[2] https://chromium-review.googlesource.com/c/chromium/src/+/3915513

Bug: 1273291
Change-Id: Ie6154dde313bdb4e46a0e557722d1b431dadc0cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984947
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132308}
2023-04-19 03:19:26 +00:00
Aman Verma
8c1c5e6191 Add UkmRecorderFactory which allows to create bidirectional
communication between UkmRecorder<->MojoUkmRecorder.

Add UkmRecorderFactory mojo interface and implementation to allow
sending updates to UkmRecorderParameters when kUkmReduceAddEntryIPC
experiment is enabled along with allowing MojoUkmRecorder to send
information to UkmRecorder. |client_remote| argument in
CreateUkmRecorder method of UkmRecorderFactory is optional.

Bug: b/261857368, b/275542357

Change-Id: I7a3a17560474cb93a945f0a3381abd22d33f06c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4334311
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Carlos Caballero Grolimund <carlscab@google.com>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1125695}
2023-04-03 23:33:58 +00:00
Arnaud Mandy
bbbabf6aa5 compute pressure: Add support for Workers
Implementation of compute pressure for dedicated workers and
shared workers.[1]

WPT tests have been updated accordingly.

[1]: https://w3c.github.io/compute-pressure/#supporting-algorithms

Bug: 1421715
Change-Id: Ia8a9b8c13677f6eeb0d302838e8d20224aa5512f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4204027
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Fr <beaufort.francois@gmail.com>
Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118524}
2023-03-17 04:59:40 +00:00
Daniel d'Andrada
8ed516fb43 SmartCard: have SmartCardService and delegate available only on ChromeOS
The Smart Card Web API is platform-agnostic. But since it will be
implemented first on ChromeOS, there's no need to expose this
to other platforms just yet.

Needed to reland https://chromium-review.googlesource.com/c/chromium/src/+/4225014.

Bug: 1386175
Change-Id: Ia7487aff1c554739d855aca5cc85d91f6b948598
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4291814
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Daniel d'Andrada <dandrader@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1110965}
2023-02-28 15:46:16 +00:00
kyraseevers
2ca6dec6a9 Resolve test failures due to per-frame refactor in *OverrideContext
In the now reverted CL [1] to convert the mojom binding in
RuntimeFeatureStateOverrideContext from a per-process to per-frame, we
discovered the potential for use-after-frees with the
RenderFrameHostImpl in the interface's impl class
(RuntimeFeatureStateControllerImpl).

This CL not only re-lands the per-frame refactor but also refactors
RuntimeFeatureStateControllerImpl to subclass DocumentService to avoid
future UAFs. It also rebases onto a separate CL [2] to address the seg
faults occurring in the linux-ubsan waterfall bot which caused the
revert in the first place (linux-ubsan-rel-ng now passes).

[1] https://chromium-review.googlesource.com/c/chromium/src/+/4256287
[2] https://chromium-review.googlesource.com/c/chromium/src/+/4265970
CL that originally implemented the IPC: https://chromium-review.googlesource.com/c/chromium/src/+/4219586

Bug: 1418722
Change-Id: Icb1dc93b8a6bfd522b20fc2fd75d255c392e1454
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4277326
Commit-Queue: Kyra Seevers <kyraseevers@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@google.com>
Cr-Commit-Position: refs/heads/main@{#1110691}
2023-02-28 00:52:11 +00:00
Nan Lin
15e9f9ba43 Replace multi-observer support with factory in Aggregation Service Internals
Similar to crrev.com/c/4246881 for ARA internals.

Change-Id: I541b0ecfa930a9363b1dc3063ba100c0b013c9d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4255607
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@google.com>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1108572}
2023-02-22 21:24:52 +00:00
Andrew Paseltiner
88f6d95a50 Replace multi-observer support with factory in Attribution Internals
We only need one observer from JS, so this is simpler and uses the
Mojo structure described in the WebUI guide:
https://chromium.googlesource.com/chromium/src/+/main/docs/webui_explainer.md#browser-c_and-renderer-js_communication

Change-Id: I873529ff22c0442d1a42d72f6792fa86ef0638ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4246881
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105874}
2023-02-15 21:17:00 +00:00
Sergey Ulanov
385c5537a5 [fuchsia] Move CDM mojo code to //media/mojo
Previously Fuchsia-specific code for CDM support was located in
//media/fuchsia/cdm. Moved it under //media/mojo for consistency with
other platforms.

Bug: 1002644
Change-Id: I93b034a1e1df55374c5d79fcb4efd18f7bf512d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4226914
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105522}
2023-02-15 07:24:10 +00:00
kyraseevers
62911c1883 Implement RuntimeFeatureStateController mojom interface
As a part of the larger initiative to allow the browser process access
to the enabled/disabled state of Blink Runtime-Enabled Features (go/brefs), this CL creates the IPC mechanism with which the renderer process alerts the browser process of any changes to these BREF values. In particular, this interface will send a diff of feature values and the associated origin trial token(s) each time an origin trial feature is enabled. The browser side will compile and store these changes in the RuntimeFeatureStateReadContext once it can verify that the tokens received are valid, the feature received is a valid origin/deprecation trial, and that we expect to be able to have browser read/write access to that feature.

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

Bug: 1377000
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I605c9800f02dbb7f9a6fb07cb36bb59728a66a37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4080618
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Steven Bingler <bingler@chromium.org>
Commit-Queue: Kyra Seevers <kyraseevers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1100514}
2023-02-02 18:24:55 +00:00
Wei4 Wang
1dfb1de076 [ComputePressure] Send PressureUpdate from PressureManagerImpl to PressureObserverManager directly
Currently, PressureUpdate is sent from PressureManagerImpl to
PressureServiceimpl firstly and then sent to PressureObserverManager.
However, PressureUpdate will not be filtered in PressureServiceImpl
anymore. So PressureUpdate can be sent from PressureManagerImpl
to PressureObserverManager directly.

This Cl also removes PressureServiceimpl, because it is no longer
needed.

Bug: 1391848
Change-Id: Iee01b9dd66246f659bb92ee307b3fc64b0962925
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4126666
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095704}
2023-01-23 17:57:44 +00:00
Mingyu Lei
38c67bec18 Add process host check when service worker creates notification service
In http://crrev.com/c/3876770, we removed the null check during
refactoring. This caused the crash described in the bug, more
information could be found in the comments.

According to the comment in `ServiceWorkerHost::GetStoragePartition()`,
> It is possible that the RenderProcessHost is gone but we receive a
> request before we had the opportunity to Detach because the disconnect
> handler wasn't run yet.
so we should add back the check for process host.

Bug: 1407528
Change-Id: I71ef8fc5e83815aa6798eaf96a9a04a8737696d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4177724
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1094911}
2023-01-20 07:52:55 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Wei4 Wang
dc34874bfb [Gamepad] Remove fenced frame specific codes
Permission policy has implemented the Gamepad API support in [1], so
fenced frame specific codes can be moved now.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3566388

Bug: 1011006
Change-Id: I1070c7fa0ef42b07dd8c05b03afbc6f233eac53b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4144276
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1090664}
2023-01-10 02:44:49 +00:00
Austin Sullivan
5b88a173dc Delete the Storage Foundation API (a.k.a. NativeIO)
Bug: 1402547
Change-Id: I02daa6f84c84857dadb319b004602f08ebb24277
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4117386
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089011}
2023-01-04 23:10:59 +00:00
Mingyu Lei
0fe8df7b57 [IndexedDB] Bind checker to receiver set and connection
This chain of CLs aims to provide a way for the IndexedDB service to
query the state of its client without introducing addition dependencies
of browser domain concepts like `RenderFrameHost` or back/forward cache
to the IndexedDB service, which minimize the work for the future work
when the IndexedDB need to be taken out as a standalone service
running on a separate process.

An example usage of this checker is for IDB process to determine if
the IDB client is currently inactive and thus not supposed to receive
certain events. See https://crrev.com/c/3980739.

Design doc: https://docs.google.com/document/d/182KlafoJMGeYe48GkOTMuJ76WhXMNmOvlp79eWEYkiA

In summary, this CL mainly does the following changes:

1. Refactor the binding methods in `IndexedDBControl` mojom interface
to also accept a `pending_associated_remote` of the above interface.

2. Create a new container `IndexedDBDispatcherHost::ReceiverContext`
that holds the `storage::BucketLocator` as well as the wrapper of the
`IndexedDBClientStateChecker` remote, so this can be associated with
the receiver and shared by all the newly opened connections.

3. Store the shared pointer of `IndexedDBClientStateChecker` in the
connection, so that the connection may use this to query the client
state in the future. Note that it's not used in this CL, so this CL
doesn't change any of the existing behavior except storing the
additional information in the IDB connection.

Change-Id: I947a89e907a7f2f61af6b42021d6b8a6f830ce6c
Bug: 1331187
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3915565
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084189}
2022-12-16 06:44:48 +00:00
Daniel d'Andrada
a028934f58 SmartCard: Add blink::mojom::SmartCardService
Add an initial, empty, SmarCardService interface.

Explainer: https://github.com/WICG/web-smart-card/blob/main/README.md
Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/BmmWnreaEII/m/S10HTJqECAAJ
Feature status: https://chromestatus.com/feature/6411735804674048

Low-Coverage-Reason: implementation is still to come.
Bug: 1386175
Change-Id: I977b18c0dafb0789077450cb969db68cad8d1b86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4079206
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Daniel d'Andrada <dandrader@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1082978}
2022-12-14 08:48:04 +00:00
Andrew Williams
fc09056a1e [Notifications] Add metrics for usage in third-party contexts
We'd like to get a sense of how often notifications are displayed
from third-party contexts. The NotificationAPISecureOriginIframe
use counter measures how often a notification is created in a
third-party secure context, but it doesn't tell us whether the
notification permission for the corresponding origin had been
granted so that a notification from a third-party context would
actually be shown instead of silently blocked. Instead, we'll
use histograms to track when notifications will be displayed and
whether they are from third-party contexts.

To do this, we pipe a blink::StorageKey into
BlinkNotificationService instead of an origin and use that to
determine whether a notification will be shown from a
third-party context. Other than implementing the metrics, this CL
should

If usage is low and we decide to deprecate sending notifications
from third-party contexts altogether, it looks like the
implementation doesn't require much more than what's required for
this CL. For a prototype, see:
https://chromium-review.googlesource.com/c/chromium/src/+/4053122

Bug: 1379370
Change-Id: I54b5dbf70a02f469b8c6758939e607cf9f05854c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4064844
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1079279}
2022-12-05 17:53:48 +00:00
Guocheng Wei
b4535741db [fuchsia] Rename FuchsiaMediaResourceProvider Mojom interface
FuchsiaMediaResourceProvider is renamed to FuchsiaMediaCdmProvider,
to reflect the functionality it provides, and the implementation is
renamed similarly.

The Mojom file is given a more generic name, to reflect that it is
the place for all Fuchsia-specific media Mojo definitions to live.

Current FuchsiaMediaResourceProvider Mojom interface will only be used
to get CDM resources in the future, with codec resources being obtained
via the new FuchsiaCdmResourceProvider interface.

Bug: 1198266, 1207991
Change-Id: I606fb5b05b3fee46ae95ca6c5729a8b2504920fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3935065
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Guocheng Wei <guochengwei@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076508}
2022-11-28 23:39:54 +00:00
Minoru Chikamune
c2d363c8e5 Dispatch IPC message for kSpeculativeServiceWorkerStartup on dedicated interface
This CL is a follow-up CL for https://crrev.com/c/3937789.

- Adds NonAssociatedLocalFrameHost to avoid LocalFrameHost's channel-associated interface [1].
- Renames WillPotentiallyStartNavigation to WillPotentiallyStartOutermostMainFrameNavigation [2].
- Adds more information to trace events, and move the code location of the trace log ([3], [4], [5]).

NonAssociatedLocalFrameHost

NonAssociatedLocalFrameHost is not a LocalFrameHost's channel-associated
interface. The reason why we want to avoid using channel-associated
interfaces is that we want to prioritize our messages without keeping
message ordering (channel-associated interfaces have to keep the message
ordering).

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3937789/comment/d9a94ef7_43a41118/
[2] https://chromium-review.googlesource.com/c/chromium/src/+/3937789/comment/213d2287_c1793e8c/
[3] https://chromium-review.googlesource.com/c/chromium/src/+/3937789/comment/d10c82f2_a332b28f/
[4] https://chromium-review.googlesource.com/c/chromium/src/+/3937789/comment/48ee2a49_04db6191/
[5] https://chromium-review.googlesource.com/c/chromium/src/+/3937789/comment/bc6521b2_e8130280/

Bug: 1377753
Change-Id: I1431862b2963570d6d170aff401aa3f197170000
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4024886
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076091}
2022-11-28 08:26:24 +00:00
Daniel Cheng
08fa43f15f Fix instances of base::Unretained() with incomplete types on Linux.
This CL fixes all existing non-test instances on a non-official Linux
build. The followup CL enforces this for non-test code on non-official
Linux builds.

Bug: 1386249
Change-Id: I92d35b1505e388096e4ab1a64525d83aa8210a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053980
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075569}
2022-11-24 15:19:09 +00:00
Guocheng Wei
ae52cc3e8d [fuchsia] Move CreateVideoDecoder into FuchsiaMediaCodecProvider
* Move CreateVideoDecoder API into the new FuchsiaMediaCodecProvider
interface.
* Add FuchsiaMediaCodecProvider in render process binders.
    * Replace the binder in the dedicate workers.
    * Add the binder in the render frame host.

We need to create video decoder in GpuVideoAcceleratorFactories for
WebRTC. GpuVideoAcceleratorFactories is per-RenderThread instead of
per-WebFrame, which the new FuchsiaMediaCodecProvider mojo interface
was designed for. See more in https://crrev.com/c/3934468.
Therefore, we should move CreateVideoDecoder into the
FuchsiaMediaCodecProvider mojo interface. Since there is no web
permission to use HW video decoder, all frames are allowed to use it.

Bug: 1198266, 1207991
Change-Id: I769bc0097c64ca1d769bc1b9db91d8414ed271c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3935071
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Guocheng Wei <guochengwei@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075431}
2022-11-24 01:45:40 +00:00
Tom Sepez
7612588836 Avoid invoking base::Unretained() on several incomplete types.
This CL helps lay the groundwork for some proposed future changes.

This merely requires including the appropriate header to complete the
type at the point it is bound.

These were discovered while trying to build chrome itself and not
the full suite of tests, so there are others still lurking.

Bug: 1392872
Change-Id: If9755289a4efc7ef7a37365746f52c6f0e6b1c27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4049435
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075389}
2022-11-23 23:47:00 +00:00
Robert Lin
12776348e0 prerender: Remove chrome://prerender-internals
This CL removes chrome://prerender-internals related code.

Bug: 1383405
Change-Id: I42e42141c9eba55259a49b05119d599f7817e804
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4025053
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1072811}
2022-11-17 15:20:50 +00:00
Iman Saboori
16071723fe Adding PreloadingDecider class for preloading link selection heuristics
Speculation rules provide a way for the developers to specify which preloading actions (i.e preload, prerender) are safe to perform on which URLs, however the user agent is not required and in most cases should not perform all of them. The browser link selection heuristics should help the UA to find the best actions among the candidates to execute.

In this CL PreloadingDecider is introduced and pointer event is
re-routed to it.

Design doc: https://docs.google.com/document/d/1sobXevsA3zND30QZLIMZ2sogy201F_P9eBkNQA6j220

Bug: 1374023
Change-Id: Ie71a386321f1f3d3f825f9f8f2c4d5248f390e91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3990190
Commit-Queue: Iman Saboori <isaboori@google.com>
Reviewed-by: Simon Pelchat <spelchat@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067539}
2022-11-04 14:59:46 +00:00
Mingyu Lei
6d78af3b30 Use RFH ID instead of pointer during binding to avoid UAF
In https://crrev.com/c/3876770, when creating binder for
`blink::mojom::NotificationService`, the `RenderFrameHost*` is captured
in the `RepeatingCallback` and will be referenced later when the real
mojo call comes in. This introduces a risk of use-after-free if there
are some race condition between the destruction of the `RenderFrameHost`
and the `DedicatedWorkerHost`.

In this CL, we pass the ID during the binding, and retrieve the
`RenderFrameHost` during the real creation to ensure that its state
is valid before getting the `WeakDocumentPtr`. This should prevent the
use-after-free crash.

See the bug link for more information of the crash.

Bug: 1379579
Change-Id: I2c4d71bc5a3e228d4d061f57402c50e3e517bbf6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3995828
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067010}
2022-11-03 14:50:08 +00:00
Mingyu Lei
3310d2898b Remove CHECK for the RFH generated by worker's ancestor id
In the previous CL https://crrev.com/c/3876770, when creating
notification service for dedicated worker, we get the RFH by using the
worker's `ancestor_render_frame_id`. The id should always exist, but
the `RenderFrameHost` may not. For example, if the `RenderFrameHost` is
gone while the `DedicatedWorkerHost` is still being instantiated, the
issue may happen.

Here the `CHECK` is removed. If `RenderFrameHost` is null, the worst
case is that the `WeakDocumentPtr` of the notification service
will be empty as well, and we won't dispatch the notification to the
client. If the ancestor `RenderFrameHost` is no longer alive, it should
be reasonable to stop dispatching any notification event to the client.

Bug: 1379721
Change-Id: I8e675c01aeb0e4145a7b32b65ea95c1a01cbb897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3989450
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1065796}
2022-11-01 02:42:31 +00:00
Mingyu Lei
0ece2ab04a Apply BFCache logic to notifications dispatched to dedicated workers
In the previous CL from the chain (https://crrev.com/c/3861889), we
implemented the logic to check if the current document is BFCache
when dispatching the notification events. However, this only works for
notification service that is created from the document directly since
the weak document pointer will be null if the notification service
is created from a worker.

In this CL, the notification service creation functions are changed
to also accept a enum flag indicating whether it's created from a
document, shared worker, dedicated worker, or service worker. This flag
will be stored in the notification service so we don't have to rely on
the `document_url` to check if it's associated with a worker.
Additionally, for dedicated workers, we store the weak document
pointer of its ancestor frame so we can determined if the host
document is in BFCache when dispatching the notification events.


Bug: 1350944
Change-Id: I8475b1e243998e599ebb3208a48f1cfa9df30b95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3876770
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064794}
2022-10-28 11:58:54 +00:00
Andrew Williams
39151a70c1 [BlobURL] Implement browser process changes needed for partitioning
TL;DR: This CL adds new code paths to support partitioning Blob URLs
by storage key, and makes it so that it’s possible to restrict Blob
URLs from being revoked in third-party contexts when storage
partitioning is enabled.

This CL contains the browser process changes, and a follow-up CL
will implement the renderer process changes.

Specifically, this CL:

 - Exposes the Blob URL Registry mojom interface directly to the
renderer instead of behind the Blob Registry class. This change is
implemented behind a new feature flag that serves as a kill switch in
case we need to revert back to the old architecture due to breakage.
After at least a few milestones with no breakage, we will remove the
feature flag and the old code.

 - Parameterizes the two BlobURL security browser tests to support
testing with both the new and old code paths. Testing the new code paths
is disabled until we land the corresponding renderer process changes. No
changes to the test behavior is intended.

 - Parameterizes the BlobUrlRegistry and BlobUrlStoreImpl unit tests to
support testing both the new and old code paths when storage
partitioning is both enabled and disabled.

More details can be found in the following design doc and implementation
design doc:

https://docs.google.com/document/d/1Ynjk5ZYPOuDq5LBZjf6YK5XYHZiaFsPYEcQIwVWh8yE/edit?usp=sharing

https://docs.google.com/document/d/1mdnfw299Kz9GwqSAOtcJQ5Q8CBNfERCsKnArxWl0Z04/edit?usp=sharing

Bug: 1261328
Change-Id: Iced6ee94746f7e80464af1426259be9b50ad9e0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3949797
Commit-Queue: Andrew Williams <awillia@google.com>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1060734}
2022-10-18 23:12:41 +00:00
Nathan Memmott
6729cf5189 Reland 67843b564f: Update indexeddb-internals page to use mojom
Updates the indexeddb-internal page to use mojom instead of the
WebUIMessageHandler.

This is a reland of 67843b564f which caused
crbug.com/1373356.

The crash occurred when a mojo callback had been std moved to a barrier
callback to collect partitions, but it was also called outside of this barrier
if the WebUI handler was destroyed.

The solution is to simply do nothing when the handler has been destroyed.

Bug: 1199077, 1373356
Change-Id: I135281ecb3fea3bb47762e2d4e0c0125f00b1b9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3953124
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1060643}
2022-10-18 20:04:07 +00:00
Ayu Ishii
d87daf562f Quota: Cleanup quota StorageType from blink
This change removes use of quota StorageType in blink and
cleans up some implementation code for requestQuota.
With persistent quota deprecation[1], requesting host quota
is no longer supported. All calls will return the minimum
of requested quota & total quota (existing behavior
for requesting quota for StorageType::kTemporary). This
change moves that logic from /content/browser/ to renderer.

Further cleanup in /storage/browser/quota to follow.

[1]https://crbug.com/1233525

Bug: 1353228
Change-Id: I93e4b9fe9e80459ebea9705ad3294d041ae0e7b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3956638
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1060159}
2022-10-17 22:03:43 +00:00
Brianna Goldstein
d22b0640ae Remove temporary conversions and clean up.
[Final NIK -> NAK conversion CL]

This CL removes the implicit conversion from NAK -> NIK that's allowed
for a quick transition between classes in the network state. It also
removes the temporary convertor from NIK->NAK that cannot be used in
a partitioned network stack since the NAK may be less granular than the
NIK.

Once the temporary convertors are disabled this CL fills in the NIK->NAK
replacements already completed.

At a high level the NAK should partition the network service while
ensuring the HTTP cache always has access to a valid NIK. Since a
NAK->NIK conversion is invalid any path that partitions the cache needs
to keep the NIK.

NetworkAnonymizationKey is an experimental key that will keep track of
the top_frame_site, the frame_site, an optional nonce and a bool
indicating if the frame_site is cross site from the top_frame_site.
These properties will be used to experiment with different partition key
schemes for the network stack while leaving the HTTP cache layer
triple-key partitioned by the NetworkIsolationKey.

More information on origin of this key can be found here:
https://docs.google.com/document/d/1cWpMN8h5O_c3MoShloCb194crY46ADYq504S8Zugrkg/edit?resourcekey=0-4Kz7ogvRTHbB2uD_BPZAPg#

Bug: 1343856
Change-Id: Ia2a201df065e57c8142053b77b40ac03a9e8aef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3937183
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Brianna Goldstein <brgoldstein@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1057499}
2022-10-11 16:30:50 +00:00
Fabian Sommer
6d6c436de4 Revert "Update indexeddb-internals page to use mojom"
This reverts commit 67843b564f.

Reason for revert:

This CL (very likely) caused the test 
ChromeURLDataManagerWebUITrustedTypesTest.NoTrustedTypesViolation/chrome___indexeddb_internals
to start failing flakily.

Failing build:
https://ci.chromium.org/ui/p/chromium/builders/ci/mac11-arm64-rel-tests/10090/test-results

Original change's description:
> Update indexeddb-internals page to use mojom
>
> Updates the indexeddb-internal page to use mojom instead of the
> WebUIMessageHandler.
>
> Bug: 1199077
> Change-Id: I14fa3e302655ee6ddcc120e916e0f798f4fcbd34
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3906465
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Austin Sullivan <asully@chromium.org>
> Commit-Queue: Nathan Memmott <memmott@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1057217}

Bug: 1199077, 1373356
Change-Id: I7669c9d1e3d9f914f6ef1e5c538c0687c345067c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3941676
Owners-Override: Fabian Sommer <fabiansommer@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Owners-Override: Yuki Shiino <yukishiino@chromium.org>
Auto-Submit: Fabian Sommer <fabiansommer@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1057364}
2022-10-11 08:34:22 +00:00
Nathan Memmott
67843b564f Update indexeddb-internals page to use mojom
Updates the indexeddb-internal page to use mojom instead of the
WebUIMessageHandler.

Bug: 1199077
Change-Id: I14fa3e302655ee6ddcc120e916e0f798f4fcbd34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3906465
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1057217}
2022-10-10 23:48:39 +00:00
Takashi Toyoshima
bfc3b28143 NetworkService: move content/browser/net to content/browser/network
As now the content/browser/net directory is more like services/network
code base, I'd rename it as content/browser/network and add the
//services/network/OWNERS.

Bug: n/a
Change-Id: I71f78a7184399f245d6f6df6ab0790e6e124961b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3934080
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1056576}
2022-10-07 23:51:37 +00:00
Matt Reynolds
033387d858 webusb: Bind WebUsbService from extension service workers
Allows the WebUSB service to be bound from an extension service worker
when the runtime feature is enabled.

Intent to prototype:
https://groups.google.com/a/chromium.org/g/blink-dev/c/VnRE2lMkS0g

Chrome status: https://chromestatus.com/feature/5200265459269632

Bug: 1303193
Change-Id: Iaec1da8dc2df2165c113a63c41e87ed50d87ac76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3892205
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1056504}
2022-10-07 20:59:37 +00:00
Giovanni Ortuño Urquidi
fc39f1487e system-extensions: Refactor System Extensions interface binders
Adds a helper functions that performs common checks for system extension
interfaces.

Also adds a filtering step so that we only register binders
corresponding to the System Extension type.

Bug: b/247427674
Change-Id: If3f1e66e349479e04a72c70aafd009ceb8200575
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3901908
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Commit-Queue: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1051069}
2022-09-26 05:05:09 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Sergey Ulanov
91f45aef28 [Fuchsia] Provide FuchsiaMediaResourceProvider to DedicatedWorkers
FuchsiaMediaResourceProvider mojo interface is used by
FuchsiaVideoDecoder, which implements HW videod decoding on Fuchsia.
This CL exposes that interface to dedicated workers, in order to make it
possible to use FuchsiaVideoDecoder for WebCodecs in dedicate workers
context.

Bug: 1321956
Change-Id: I055f3e9d6d326425b1ac3f0fe8050d4893279a88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3887237
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047149}
2022-09-14 22:25:26 +00:00
Evan Stade
88ef223277 Storage buckets: add more plumbing for CacheStorage
Since CacheStorage requires some extra params related to
CrossOriginEmbedderPolicy, BucketContext is no longer a struct and
is replaced by an interface which worker and frame hosts implement.
This interface should encapsulate all the info required to service
buckets API requests.

For now the returned CacheStorage object will always be the one for
the default bucket.

Bug: 1264128
Change-Id: I2f770e74134af4eaaafb8471dc62a8d2b219b5fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3838637
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046022}
2022-09-12 21:19:09 +00:00
Andrew Rayskiy
b6d994985f Direct Sockets API: Enable the API in extensions.
This CL adds support for chrome-extension:// urls in ChromeContentBrowserClient::ShouldUrlUseApplicationIsolationLevel so that extension contexts are treated like isolated (while retaining the original permissions policy).

In parallel, a delegate called DirectSocketsDelegate is added to //content/public/browser to make checking extension-specific chrome sockets restrictions (as per the "sockets" section of the extension manifest) possible on the browser side.

Bug: b/243164338

Change-Id: Id90968eac218cf942b44de31278f882b09a06f67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817183
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1042008}
2022-09-01 10:24:42 +00:00
John Delaney
35c275f7c6 Implement initial version of private aggregation API internals UI
What:

Adds a chrome://private-aggregation-internals page which supports:
 * showing pending and sent aggregatable reports stored by the aggregation service
 * sending selected reports from the web UI
 * clearing data

Screenshot can be found in crbug.com/1348029.

This change re-uses the table approach used by
chrome://attribution-reporting-internals.

Bug: 1348029
Change-Id: I23ac2a037c1d2d453f3bf1fd719caf0f92b2fac8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3789670
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: John Delaney <johnidel@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1037228}
2022-08-19 19:31:54 +00:00
Robert Sesek
976c70cf77 Convert //content WebUIs to register with RegisterWebUIControllerInterfaceBinder()
This also adds support for the WebUIController to optionally receive the
BindInterface() with the associated RenderFrameHost.

Change-Id: I8dffd7e1eb4321ac3bb10937e7b8421b8d134e44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3825966
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1034619}
2022-08-12 19:17:57 +00:00
Evan Stade
538a015b50 Storage Buckets: use StorageKey as key (in place of Origin)
Bug: 1328383

Change-Id: I735b67201fbbe3bf4aa81baced313dca858ab290
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788051
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030226}
2022-08-01 19:36:34 +00:00
Wei4 Wang
a73b4a2166 [ComputePressure] Rename classes
The class name has changed from ComputePressureXXX to PressureXXX
in the spec. This patch rename classes in implementation to make
them align with the spec. Detailed information can be found here:
3a41340eda


Bug: 1340165
Change-Id: Ie34740a15b253ba2f8b95d66fc186b86862df362
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3771085
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1026071}
2022-07-20 02:26:19 +00:00
Wei4 Wang
0b2ecad911 [ComputePressure] Make ComputePressure as a service.
The patch makes ComputePressure as a service and the major
changes are:
1. Move ComputePressureManager and related classes from
content/browser to services/device. Rename ComputePressureManager
to ComputePressureManagerImpl.
2. Rename ComputePressureHost to ComputePressureServiceImpl.
3. ComputePressureSample data are collected in service now and then
send to ComputePressureServiceImpl. If the data changes and meets
frequency requirement, ComputePressureServiceImpl will send the
data to Blink.
4. CpuProbe collects data only when there is active
ComputePressureObserver. It stops collecting when all
ComputePressureObservers become inactive.

The compute_pressure_different_quantizations_across_iframes test
fails in this patch. However, there is no concept of the quantization
in the newest spec any more and we will remove this test in the
future.

Bug: 1205695, 1311945
Change-Id: I388ce2ea3d7be2e717c080d92c77b8d0b3570f03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3661519
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1025483}
2022-07-19 00:36:11 +00:00
Aykut Bulut
b988425fb8 Rename HasTrustTokensAnswerer
Rename trust token class HasTrustTokensAnswerer to TrustTokenQueryAnswerer.

Fixed: 1343785
Change-Id: I09293a89fbe6cf5b455be0d70b66f326597a8bd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3757924
Commit-Queue: Aykut Bulut <aykutb@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1025272}
2022-07-18 16:18:38 +00:00
Sreeja Kamishetty
9deccf0f0e Move content/browser/speculation_rules/ directory to content/browser/preloading
With our Precog effort, we want to bring together all Preloading code together at one place to bring more structuring and reusing the common logic between various preloading types and predictors to decrease the code complexity.

In this CL, we move all files in the content/browser/speculation_rules/
directory to content/browser/preloading/speculation_rules.

This is a no-op move.

For more details on directory structuring please see:
https://docs.google.com/document/d/13SnVgi16aD6X0rb-b4_F5h-7Reb9iGY_cKfzHZmXGDg/edit?usp=sharing

BUG=1337129

Change-Id: I2d4f8e233c2f6a34d1d5325cd716eb52ef59312f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3741425
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Sreeja Kamishetty <sreejakshetty@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Simon Pelchat <spelchat@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1024324}
2022-07-14 18:12:16 +00:00
Chris Harrelson
d2fe06ad17 Move render_accessibility.mojom to blink/public/mojom
This allows us to directly fill these mojo structs from blink rather
than copying data back and forth to content/ code. It also seems like a
necessary step for a11y onion soup.

Bug: 1068668, 882660, 1342801

Change-Id: I13b775c5048ea32d93d5552669152465f993e012
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3753166
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Abigail Klein <abigailbklein@google.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1022906}
2022-07-11 21:36:23 +00:00