Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed)

Created:
5 years, 4 months ago by Fabrice (no longer in Chrome)
Modified:
5 years ago
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, serviceworker-reviews, creis+watch_chromium.org, mlamouri+watch-content_chromium.org, tzik, nasko+codewatch_chromium.org, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, kinuko+serviceworker, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: Make ServiceWorker work with PlzNavigate. BUG=440463

Patch Set 1 #

Patch Set 2 : Style, placeholders, all that stuff #

Total comments: 31

Patch Set 3 : Review comments #

Patch Set 4 : Rebase #

Total comments: 22

Patch Set 5 : Review comments #

Patch Set 6 : Rebase #

Total comments: 23

Patch Set 7 : Review comments #

Total comments: 32

Patch Set 8 : Move dummy SWProviderHost to SWRequestHandler #

Patch Set 9 : Rebase #

Total comments: 38

Patch Set 10 : Glorious Post-Blink Merge Rebase #

Total comments: 2

Patch Set 11 : New design, new ownership rules, all that #

Patch Set 12 : Rebase #

Total comments: 71

Patch Set 13 : Review comments #

Patch Set 14 : Missed a spot. #

Total comments: 30

Patch Set 15 : Rebase #

Patch Set 16 : Review comments #

Total comments: 53

Patch Set 17 : Rebase #

Patch Set 18 : Cleanup + review comments #

Patch Set 19 : Cleanup includes and forward decls. #

Total comments: 40

Patch Set 20 : Review comments #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -80 lines) Patch
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +33 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +25 lines, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/loader/navigation_url_loader_impl_core.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -1 line 0 comments Download
M content/browser/loader/navigation_url_loader_impl_core.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -4 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +15 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +17 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +28 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +7 lines, -0 lines 1 comment Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +20 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +50 lines, -18 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +14 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +104 lines, -27 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +13 lines, -2 lines 0 comments Download
M content/common/service_worker/service_worker_utils.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +49 lines, -10 lines 4 comments Download

Messages

Total messages: 67 (4 generated)
Fabrice (no longer in Chrome)
Follow-up from https://codereview.chromium.org/1257553002/ I removed the navigation_provider_id. In PlzNavigate, for browser-initiated navigations, we will SWProviderHost ...
5 years, 4 months ago (2015-08-20 16:21:24 UTC) #2
nasko
Thanks for working through this one Fabrice? I'm not super ecstatic about all the parameters ...
5 years, 4 months ago (2015-08-20 16:49:51 UTC) #3
kinuko
Thanks for taking over this!! https://codereview.chromium.org/1294243004/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/1294243004/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode739 content/browser/service_worker/service_worker_dispatcher_host.cc:739: if (provider_id < kInvalidServiceWorkerProviderId) ...
5 years, 4 months ago (2015-08-21 14:00:44 UTC) #4
clamy
Thanks! A few comments on the navigation part of the patch. I second Nasko's suggestion ...
5 years, 4 months ago (2015-08-24 12:27:35 UTC) #5
Fabrice (no longer in Chrome)
Thanks for the comments everyone! New patch, less arguments in NavigationParams, different problems! https://codereview.chromium.org/1294243004/diff/20001/content/browser/frame_host/navigation_request.cc File ...
5 years, 3 months ago (2015-08-26 13:23:25 UTC) #6
kinuko
https://codereview.chromium.org/1294243004/diff/20001/content/common/navigation_params.h File content/common/navigation_params.h (right): https://codereview.chromium.org/1294243004/diff/20001/content/common/navigation_params.h#newcode138 content/common/navigation_params.h:138: // True if the ServiceWorker should be skipped. On ...
5 years, 3 months ago (2015-08-27 01:37:44 UTC) #7
Fabrice (no longer in Chrome)
https://codereview.chromium.org/1294243004/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1294243004/diff/20001/content/renderer/render_frame_impl.cc#newcode2528 content/renderer/render_frame_impl.cc:2528: provider_type = SERVICE_WORKER_PROVIDER_FOR_SANDBOXED_FRAME; On 2015/08/20 16:49:50, nasko (out until ...
5 years, 3 months ago (2015-08-27 11:18:15 UTC) #8
clamy
Thanks! A few comments on my part. https://codereview.chromium.org/1294243004/diff/60001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/1294243004/diff/60001/content/browser/frame_host/navigation_request.cc#newcode97 content/browser/frame_host/navigation_request.cc:97: REQUEST_CONTEXT_TYPE_LOCATION, I'm ...
5 years, 3 months ago (2015-08-27 11:53:45 UTC) #9
carlosk
Thanks for taking care of this. I'd like to check: do we need PlzNavigate specific ...
5 years, 3 months ago (2015-08-27 14:26:43 UTC) #10
clamy
https://codereview.chromium.org/1294243004/diff/60001/content/common/navigation_params.h File content/common/navigation_params.h (right): https://codereview.chromium.org/1294243004/diff/60001/content/common/navigation_params.h#newcode136 content/common/navigation_params.h:136: bool skip_service_worker; On 2015/08/27 14:26:43, carlosk wrote: > If ...
5 years, 3 months ago (2015-08-27 15:19:03 UTC) #11
carlosk
On 2015/08/27 15:19:03, clamy wrote: > https://codereview.chromium.org/1294243004/diff/60001/content/common/navigation_params.h > File content/common/navigation_params.h (right): > > https://codereview.chromium.org/1294243004/diff/60001/content/common/navigation_params.h#newcode136 > ...
5 years, 3 months ago (2015-08-27 16:27:20 UTC) #12
clamy
Still, I don't like it: - it seems to me that it is cleverness over ...
5 years, 3 months ago (2015-08-28 10:05:49 UTC) #13
carlosk
On 2015/08/28 10:05:49, clamy wrote: > Still, I don't like it: > - it seems ...
5 years, 3 months ago (2015-08-28 12:22:15 UTC) #14
Fabrice (no longer in Chrome)
Thanks all! I removed Nasko's DCHECK in render_frame_impl between patches 4 and 5 since the ...
5 years, 3 months ago (2015-08-28 15:40:16 UTC) #15
clamy
Thanks! A few more comments on my part and it should be good for me. ...
5 years, 3 months ago (2015-08-31 12:09:27 UTC) #16
Fabrice (no longer in Chrome)
Thanks! Responses in-line. https://codereview.chromium.org/1294243004/diff/100001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/1294243004/diff/100001/content/browser/frame_host/navigation_request.cc#newcode14 content/browser/frame_host/navigation_request.cc:14: #include "content/browser/service_worker/service_worker_provider_host.h" On 2015/08/31 12:09:26, clamy ...
5 years, 3 months ago (2015-08-31 14:00:35 UTC) #17
clamy
Thanks! Lgtm provided service worker people are happy. https://codereview.chromium.org/1294243004/diff/100001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/1294243004/diff/100001/content/browser/frame_host/navigation_request.cc#newcode14 content/browser/frame_host/navigation_request.cc:14: #include ...
5 years, 3 months ago (2015-08-31 16:58:49 UTC) #18
nasko
Mainly one question based on the non-serviceworker code. I'd like someone from the SW team ...
5 years, 3 months ago (2015-08-31 23:58:17 UTC) #19
michaeln
This is looking pretty good but I think I see a possible leak, see inline ...
5 years, 3 months ago (2015-09-01 01:15:23 UTC) #20
carlosk
I think transitioning to using a navigation id as michaeln@ suggested would be nice. https://codereview.chromium.org/1294243004/diff/120001/content/common/navigation_params.h ...
5 years, 3 months ago (2015-09-01 09:27:46 UTC) #21
Fabrice (no longer in Chrome)
Apologies for the delay, moving the dummy SWPH proved to be a bit more complicated ...
5 years, 3 months ago (2015-09-07 12:09:48 UTC) #22
Fabrice (no longer in Chrome)
Quick update, since this patch is starting to get kinda large, I am breaking it ...
5 years, 3 months ago (2015-09-07 17:02:48 UTC) #23
nasko
On 2015/09/07 17:02:48, Fabrice wrote: > Quick update, since this patch is starting to get ...
5 years, 3 months ago (2015-09-14 21:28:16 UTC) #24
nasko
https://codereview.chromium.org/1294243004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/1294243004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode734 content/browser/service_worker/service_worker_dispatcher_host.cc:734: CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( On 2015/09/07 12:09:48, Fabrice wrote: > On 2015/09/01 ...
5 years, 3 months ago (2015-09-14 21:28:32 UTC) #25
clamy
https://codereview.chromium.org/1294243004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/1294243004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode734 content/browser/service_worker/service_worker_dispatcher_host.cc:734: CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( On 2015/09/14 21:28:32, nasko (slow to review) wrote: ...
5 years, 3 months ago (2015-09-14 21:35:00 UTC) #26
nasko
On 2015/09/14 21:35:00, clamy wrote: > https://codereview.chromium.org/1294243004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc > File content/browser/service_worker/service_worker_dispatcher_host.cc (right): > > https://codereview.chromium.org/1294243004/diff/120001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode734 > ...
5 years, 3 months ago (2015-09-14 22:03:06 UTC) #27
Fabrice (no longer in Chrome)
Thanks! No new patch yet, just an answer to the comment about the command line ...
5 years, 3 months ago (2015-09-15 15:38:54 UTC) #28
michaeln
I think i need to patch it in and enable the flag to better see ...
5 years, 3 months ago (2015-09-16 00:56:42 UTC) #29
michaeln
I've patched it in to take a closer took. In my local build, so far ...
5 years, 3 months ago (2015-09-18 23:03:57 UTC) #30
michaeln
This cl is tough because it requires a solid working knowledge of multiple areas of ...
5 years, 3 months ago (2015-09-19 00:14:40 UTC) #31
michaeln
Or better yet, divide and conquer to get the details right. I'd be great if ...
5 years, 3 months ago (2015-09-19 01:00:28 UTC) #32
michaeln
https://codereview.chromium.org/1294243004/diff/180001/content/browser/loader/navigation_url_loader_impl_core.cc File content/browser/loader/navigation_url_loader_impl_core.cc (right): https://codereview.chromium.org/1294243004/diff/180001/content/browser/loader/navigation_url_loader_impl_core.cc#newcode56 content/browser/loader/navigation_url_loader_impl_core.cc:56: ResourceDispatcherHostImpl::Get()->BeginNavigationRequest( Upon return from this function, the newly created ...
5 years, 3 months ago (2015-09-23 19:18:17 UTC) #33
Fabrice (no longer in Chrome)
I have been working on a new design, but have encountered some issue. Keeping ownership ...
5 years, 2 months ago (2015-09-25 19:40:09 UTC) #34
michaeln
On 2015/09/25 19:40:09, Fabrice wrote: > I have been working on a new design, but ...
5 years, 2 months ago (2015-09-25 21:02:23 UTC) #35
clamy
On 2015/09/25 21:02:23, michaeln wrote: > On 2015/09/25 19:40:09, Fabrice wrote: > > I have ...
5 years, 2 months ago (2015-09-25 21:10:43 UTC) #36
clamy
So the idea we had is that we should have a UI thread handle similar ...
5 years, 2 months ago (2015-09-25 22:04:11 UTC) #37
michaeln
On 2015/09/25 22:04:11, clamy wrote: > So the idea we had is that we should ...
5 years, 2 months ago (2015-09-25 23:55:00 UTC) #38
clamy
No I meant the SWHandle, sorry for the confusion.
5 years, 2 months ago (2015-09-25 23:59:35 UTC) #39
michaeln
The new SW provided class is a ServiceWorkerNavigationHandle. The nav stack has to ensure its ...
5 years, 2 months ago (2015-09-26 01:24:47 UTC) #40
Fabrice (no longer in Chrome)
Just a heads-up. I tried to design as proposed here, but encountered some threading issues. ...
5 years, 2 months ago (2015-09-29 16:46:02 UTC) #41
michaeln
That sounds pretty similar, except there is no ServiceWorkerNavigationHandle to encapsulate some of the details. ...
5 years, 2 months ago (2015-09-29 21:52:07 UTC) #42
kinuko
Yeah if we need a safe 'handle' to work with SWProviderHost on UI thread adding ...
5 years, 2 months ago (2015-09-30 02:43:45 UTC) #43
clamy
The idea was to generate the ServiceWorkerProviderHost ID on the UI thread and keep it ...
5 years, 2 months ago (2015-09-30 09:33:09 UTC) #44
Fabrice (no longer in Chrome)
Thanks everyone! I'm sorry this took so long, but this should look much better now. ...
5 years, 2 months ago (2015-09-30 17:32:08 UTC) #45
michaeln
This is looking pretty good! I think its close. I haven't looked at tests yet. ...
5 years, 2 months ago (2015-10-01 01:42:16 UTC) #46
clamy
Thanks! I think the design is better in this patch. There are still a few ...
5 years, 2 months ago (2015-10-01 12:41:27 UTC) #47
Fabrice (no longer in Chrome)
Thanks for the quick review! More comments inline, but this is the summary of remaining ...
5 years, 2 months ago (2015-10-01 18:29:56 UTC) #48
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1294243004/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1294243004/260001
5 years, 2 months ago (2015-10-01 18:53:18 UTC) #50
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/48296)
5 years, 2 months ago (2015-10-01 19:01:01 UTC) #52
michaeln
https://codereview.chromium.org/1294243004/diff/220001/content/browser/frame_host/navigation_handle_impl.h File content/browser/frame_host/navigation_handle_impl.h (right): https://codereview.chromium.org/1294243004/diff/220001/content/browser/frame_host/navigation_handle_impl.h#newcode65 content/browser/frame_host/navigation_handle_impl.h:65: int service_worker_provider_id); On 2015/10/01 18:29:55, Fabrice wrote: > On ...
5 years, 2 months ago (2015-10-01 23:11:12 UTC) #53
clamy
https://codereview.chromium.org/1294243004/diff/220001/content/browser/frame_host/navigation_handle_impl.h File content/browser/frame_host/navigation_handle_impl.h (right): https://codereview.chromium.org/1294243004/diff/220001/content/browser/frame_host/navigation_handle_impl.h#newcode65 content/browser/frame_host/navigation_handle_impl.h:65: int service_worker_provider_id); On 2015/10/01 23:11:11, michaeln wrote: > On ...
5 years, 2 months ago (2015-10-02 10:34:44 UTC) #54
Fabrice (no longer in Chrome)
Thanks! New patch, new comments, new answers. I changed the map in SWContextCore to handle ...
5 years, 2 months ago (2015-10-02 16:37:35 UTC) #55
nasko
I think this time it was much easier to follow. Good job! A bunch of ...
5 years, 2 months ago (2015-10-02 22:09:46 UTC) #56
clamy
Thanks! This is getting a closer. A few comments in addition to the ones on ...
5 years, 2 months ago (2015-10-05 12:18:17 UTC) #57
Fabrice (no longer in Chrome)
Thanks! Rebased, cleaned up and fixed comments following the 2 spin off patches. PTAL https://codereview.chromium.org/1294243004/diff/300001/content/browser/frame_host/navigation_handle_impl.cc ...
5 years, 2 months ago (2015-10-06 17:21:39 UTC) #58
michaeln
I think the logic is in pretty good shape now. Somebody on the serviceworker team ...
5 years, 2 months ago (2015-10-07 01:16:44 UTC) #59
clamy
Thanks! Lgtm with nits. https://codereview.chromium.org/1294243004/diff/360001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1294243004/diff/360001/content/browser/frame_host/navigation_handle_impl.cc#newcode58 content/browser/frame_host/navigation_handle_impl.cc:58: // TODO: Picking the partition ...
5 years, 2 months ago (2015-10-07 07:53:30 UTC) #60
Fabrice (no longer in Chrome)
Thanks! I added comments to clarify what happens with navigation ServiceWorkerProviderHosts. I changed the render_frame_impl ...
5 years, 2 months ago (2015-10-07 12:59:44 UTC) #61
michaeln
Someobody from the core sw team should give the stamp of approval and whether they'd ...
5 years, 2 months ago (2015-10-08 02:18:52 UTC) #63
michaeln
Was just chatting with kinuko about this one. I'll pick it up and dust it ...
5 years, 2 months ago (2015-10-14 01:48:28 UTC) #64
clamy
Actually I'm working on an updated version of this patch. I uncovered an issue in ...
5 years, 2 months ago (2015-10-14 09:55:10 UTC) #65
clamy
And I have a new CL up at https://codereview.chromium.org/1399363004/.
5 years, 2 months ago (2015-10-14 14:08:52 UTC) #66
michaeln
5 years, 2 months ago (2015-10-14 18:57:20 UTC) #67
On 2015/10/14 14:08:52, clamy wrote:
> And I have a new CL up at https://codereview.chromium.org/1399363004/.

fantastique, merci beaucoup!

Powered by Google App Engine
This is Rietveld 408576698