0
Commit Graph

10 Commits

Author SHA1 Message Date
Hiroshige Hayashizaki
e602749044 Remove SubresourceLoaderParams::service_worker_client
By merging into `ServiceWorkerMainResourceHandle`.

Bug: 336154571
Change-Id: Ia11b058f950f9abd4fabf25b5a0f95d6f76584ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5591000
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320134}
2024-06-27 01:52:43 +00:00
Hiroshige Hayashizaki
e39945833e Revert "CHECK controller not changed during main resource loading"
This reverts commit d218ee9e07.

Reason for revert: The CHECK is actually failing crbug.com/342860788

Original change's description:
> CHECK controller not changed during main resource loading
>
> Follow-up for [1]:
> https://chromium-review.googlesource.com/c/chromium/src/+/5514586
>
> [1] changed the timing of taking the ServiceWorker controller used
> for subresource loading from
> `ServiceWorkerClient::MaybeCreateSubresourceLoaderParams()`
> to around `ServiceWorkerClient::CommitResponse()`.
> This CL CHECK()s that the controller is the same in these timings.
>
> Bug: 336154571
> Change-Id: I711634f114a9b97265f7217a5748a2debd4d9e4a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5549058
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
> Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1306125}

Bug: 336154571, 342860788
Change-Id: I9e1a85dd7088adfac6e943072c9c9eb51a559a77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5578735
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1307098}
2024-05-28 22:45:35 +00:00
Hiroshige Hayashizaki
d218ee9e07 CHECK controller not changed during main resource loading
Follow-up for [1]:
https://chromium-review.googlesource.com/c/chromium/src/+/5514586

[1] changed the timing of taking the ServiceWorker controller used
for subresource loading from
`ServiceWorkerClient::MaybeCreateSubresourceLoaderParams()`
to around `ServiceWorkerClient::CommitResponse()`.
This CL CHECK()s that the controller is the same in these timings.

Bug: 336154571
Change-Id: I711634f114a9b97265f7217a5748a2debd4d9e4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5549058
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306125}
2024-05-25 21:12:56 +00:00
Hiroshige Hayashizaki
3d32f2db0a Create ControllerInfo after CommitResponse()
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}
2024-05-25 20:14:15 +00:00
Hiroshige Hayashizaki
1e4fe1da0a Remove reset_subresource_loader_params
And instead detect the controller lost in
`NavigationURLLoaderImpl`.

This is to simplify
NavigationLoaderInterceptor's fallback_callback.

Bug: 1403746
Change-Id: I530d1037d0f3806c647b71d047fb550581393f72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5280429
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1261082}
2024-02-15 16:11:02 +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
Adrienne Walker
be0664d51f appcache: Remove AppCacheFactory from url loader factory bundle
Bug: 582750
Change-Id: I30f60dce343e1a702f314bf2b10290f64734c1cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3208947
Auto-Submit: enne <enne@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#930644}
2021-10-12 17:51:41 +00:00
Dominic Farolino
1be897a021 Convert old mojo types to new ones in //content loading code
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}
2019-07-20 08:11:42 +00:00
Tsuyoshi Horo
eaf3b29ff2 Pass prefetched signed exchanges to renderer process
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}
2019-05-14 00:52:27 +00:00
Tsuyoshi Horo
5b3cefd510 Move navigation_subresource_loader_params.* from content/common to content/browser
This class is used only in the browser process.

Bug: 935267
Change-Id: I165997ea73ec8da973a8cade28bdebf9fad532e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1580684
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653492}
2019-04-24 04:58:21 +00:00