Before this CL,
`blink::mojom::ControllerServiceWorkerInfoPtr` is created at
`ServiceWorkerClient::MaybeCreateSubresourceLoaderParams()`
which is called early in the main resource fetch (around when its
controlling service worker is determined), using two-phase
initialization of `CreateIncompleteObjectInfo()` and
`AddRemoteObjectPtrAndUpdateState()` that needs
`ServiceWorkerContainerHost`.
To simplify the code and remove dependencies from main resource
fetch to `ServiceWorkerContainerHost`, this CL creates
`blink::mojom::ControllerServiceWorkerInfoPtr`
just before it is sent to the renderer process,
after `ServiceWorkerClient::CommitResponse()`
before `ServiceWorkerClient::SetContainerReady()`.
This CL also removes
- `ServiceWorkerClient::pending_controller_receiver_` because
`GetRemoteControllerServiceWorker()` is called only after
`CommitResponse()`.
- `CreateIncompleteObjectInfo()` and
`AddRemoteObjectPtrAndUpdateState()` as we no longer perform
the two-phase initialization.
This CL might cause behavior changes because this CL creates
`ControllerServiceWorkerInfoPtr` from the service worker client's
controller's state at the time of e.g. navigation commit instead of
at the beginning of main resource fetch, but this should be OK as:
- the ServiceWorkerClient's controller should be unchanged during
that period (because the client is not execution ready).
https://chromium-review.googlesource.com/c/chromium/src/+/5549058
will add a CHECK to confirm this.
- Sending more latest state of the controller should be also fine,
as we anyway send more latest state on SendSetController() after
navigation.
Bug: 336154571
Change-Id: I7f98c0867f4c85696bb77c3a4a52dee473a7a16c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5514586
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306120}
Specifically, this code updates URLLoaderFactoryBundleInfo, and
subclasses to use the new mojo types. This CL also updates variables
that reference this class in RenderFrameHostImpl, and follows the path
down through ContentBrowserClient subclasses updating variables where
necessary.
The change is mostly mechanical, and as tightly-scoped as I could make
it given the instances I aimed to update.
Bug: 955171
Change-Id: Ic979f4a34709bb74466dd4fa391cba92010f2e2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695042
Commit-Queue: Dominic Farolino <dom@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679375}
This CL introduces PrefetchedSignedExchangeInfo struct, which keeps the
information about a prefetched signed exchange. It is created in
PrefetchedSignedExchangeCache and passed to SubresourceLoaderParams and will be
passed to the renderer process in CommitNavigation IPC's CommitNavigationParams.
Bug: 935267
Change-Id: Id67c2ce99801f6c89d679cf9efaf65617d68cdfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600438
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659318}