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

Issue 2410333006: Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(). (Closed)

Created:
4 years, 2 months ago by horo
Modified:
4 years, 2 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, cbentzel+watch_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, eroman, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(). This CL depends on https://codereview.chromium.org/2417793002. FetchEvent.navigationPreload will be implemented in the following steps. [1/4] Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent. https://codereview.chromium.org/2417793002/ [2/4] Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(). https://codereview.chromium.org/2410333006/ This CL. [3/4] Implement FetchEvent.navigationPreload. https://codereview.chromium.org/2416843002/ [4/4] Add browser tests for NavigationPreload. https://codereview.chromium.org/2413643005/ BUG=649558 Committed: https://crrev.com/36762af751e2100946cff85db993910e8a402423 Cr-Commit-Position: refs/heads/master@{#426423}

Patch Set 1 : with https://codereview.chromium.org/2410333006/ #

Patch Set 2 : diff from with https://codereview.chromium.org/2410333006/ #

Total comments: 8

Patch Set 3 : add comment #

Patch Set 4 : incorporated falken's comment #

Total comments: 6

Patch Set 5 : incorporated mmenke's comment #

Patch Set 6 : introduce RedirectionBlockingResourceHandler #

Patch Set 7 : go through the mojo URLLoaderFactory interface #

Patch Set 8 : add comment about switch #

Total comments: 6

Patch Set 9 : incorporated falken's comment #

Total comments: 2

Patch Set 10 : add comment in sw_fetch_dispatcher.cc and split the media test change to 2427363004 #

Total comments: 6

Patch Set 11 : DCHECK_CURRENTLY_ON(BrowserThread::IO) in MakeRequestID() #

Patch Set 12 : incorporated sadrul's comment #

Total comments: 3

Patch Set 13 : add comment in service_worker_url_request_job.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -45 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +12 lines, -17 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/service_worker/foreign_fetch_request_handler.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_fetch_dispatcher.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_fetch_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +55 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_handle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M content/common/service_worker/service_worker_types.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 88 (48 generated)
horo
falken@ Could you please review this?
4 years, 2 months ago (2016-10-13 14:28:06 UTC) #7
falken
This lgtm I think you should get a /net person to review the LayeredResourceHandler stuff ...
4 years, 2 months ago (2016-10-14 07:53:12 UTC) #8
horo
mmenke@ Could you please review this CL? https://codereview.chromium.org/2410333006/diff/40001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://codereview.chromium.org/2410333006/diff/40001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode283 content/browser/service_worker/service_worker_fetch_dispatcher.cc:283: // Currently ...
4 years, 2 months ago (2016-10-14 16:09:05 UTC) #11
horo
+CC:yhirano@
4 years, 2 months ago (2016-10-14 16:10:05 UTC) #12
mmenke
https://codereview.chromium.org/2410333006/diff/100001/content/browser/service_worker/service_worker_navigation_preload_fetcher.cc File content/browser/service_worker/service_worker_navigation_preload_fetcher.cc (right): https://codereview.chromium.org/2410333006/diff/100001/content/browser/service_worker/service_worker_navigation_preload_fetcher.cc#newcode35 content/browser/service_worker/service_worker_navigation_preload_fetcher.cc:35: class PreloadResourceHandler : public LayeredResourceHandler { While this class ...
4 years, 2 months ago (2016-10-14 16:31:33 UTC) #15
horo
https://codereview.chromium.org/2410333006/diff/100001/content/browser/service_worker/service_worker_navigation_preload_fetcher.cc File content/browser/service_worker/service_worker_navigation_preload_fetcher.cc (right): https://codereview.chromium.org/2410333006/diff/100001/content/browser/service_worker/service_worker_navigation_preload_fetcher.cc#newcode35 content/browser/service_worker/service_worker_navigation_preload_fetcher.cc:35: class PreloadResourceHandler : public LayeredResourceHandler { On 2016/10/14 16:31:33, ...
4 years, 2 months ago (2016-10-15 00:55:46 UTC) #19
mmenke
On 2016/10/15 00:55:46, horo wrote: > https://codereview.chromium.org/2410333006/diff/100001/content/browser/service_worker/service_worker_navigation_preload_fetcher.cc > File content/browser/service_worker/service_worker_navigation_preload_fetcher.cc > (right): > > https://codereview.chromium.org/2410333006/diff/100001/content/browser/service_worker/service_worker_navigation_preload_fetcher.cc#newcode35 ...
4 years, 2 months ago (2016-10-15 01:32:47 UTC) #20
horo
> I don't mean it just cancels on redirect, I mean it hits a NOTREACHED, ...
4 years, 2 months ago (2016-10-15 06:23:15 UTC) #24
yhirano
MojoAsyncResourceHandler is not ready for production use, but this feature is experimental as well IIUC. ...
4 years, 2 months ago (2016-10-17 13:12:29 UTC) #27
mmenke
On 2016/10/17 13:12:29, yhirano wrote: > MojoAsyncResourceHandler is not ready for production use, but this ...
4 years, 2 months ago (2016-10-17 16:42:59 UTC) #28
horo
On 2016/10/17 16:42:59, mmenke wrote: > Enabling it in experiments, even on Canary and dev, ...
4 years, 2 months ago (2016-10-17 17:01:55 UTC) #29
mmenke
On 2016/10/17 17:01:55, horo wrote: > On 2016/10/17 16:42:59, mmenke wrote: > > Enabling it ...
4 years, 2 months ago (2016-10-17 20:00:45 UTC) #30
falken
> This NavigationPreload feature is under the > "enable-experimental-web-platform-features" flag. > Is it "production use"? ...
4 years, 2 months ago (2016-10-18 07:36:43 UTC) #31
horo
On 2016/10/17 20:00:45, mmenke wrote: > The "normal path" would mean either going through the ...
4 years, 2 months ago (2016-10-18 07:47:49 UTC) #34
mmenke
On 2016/10/18 07:36:43, falken wrote: > > This NavigationPreload feature is under the > > ...
4 years, 2 months ago (2016-10-18 14:40:55 UTC) #42
mmenke
On 2016/10/18 07:47:49, horo wrote: > On 2016/10/17 20:00:45, mmenke wrote: > > The "normal ...
4 years, 2 months ago (2016-10-18 14:43:34 UTC) #43
falken
On 2016/10/18 14:40:55, mmenke wrote: > On 2016/10/18 07:36:43, falken wrote: > > > This ...
4 years, 2 months ago (2016-10-19 00:11:57 UTC) #44
horo
On 2016/10/19 00:11:57, falken wrote: > On 2016/10/18 14:40:55, mmenke wrote: > > On 2016/10/18 ...
4 years, 2 months ago (2016-10-19 03:15:13 UTC) #47
horo
falken@ Could you please review PS8 again? There are differences after PS4.
4 years, 2 months ago (2016-10-19 03:16:44 UTC) #48
horo
On 2016/10/19 03:15:13, horo wrote: > On 2016/10/19 00:11:57, falken wrote: > > On 2016/10/18 ...
4 years, 2 months ago (2016-10-19 04:14:51 UTC) #49
falken
https://codereview.chromium.org/2410333006/diff/220001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://codereview.chromium.org/2410333006/diff/220001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode317 content/browser/service_worker/service_worker_fetch_dispatcher.cc:317: request.resource_type = RESOURCE_TYPE_SUB_RESOURCE; Why SUB_RESOURCE instead of resource_type_? https://codereview.chromium.org/2410333006/diff/220001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode325 ...
4 years, 2 months ago (2016-10-19 05:11:28 UTC) #50
horo
https://codereview.chromium.org/2410333006/diff/220001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://codereview.chromium.org/2410333006/diff/220001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode317 content/browser/service_worker/service_worker_fetch_dispatcher.cc:317: request.resource_type = RESOURCE_TYPE_SUB_RESOURCE; On 2016/10/19 05:11:27, falken wrote: > ...
4 years, 2 months ago (2016-10-19 06:22:52 UTC) #54
falken
lgtm https://codereview.chromium.org/2410333006/diff/240001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://codereview.chromium.org/2410333006/diff/240001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode318 content/browser/service_worker/service_worker_fetch_dispatcher.cc:318: request.resource_type = RESOURCE_TYPE_SUB_RESOURCE; Let's add a comment like ...
4 years, 2 months ago (2016-10-19 06:43:18 UTC) #55
horo
Thank you. https://chromiumcodereview.appspot.com/2410333006/diff/240001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://chromiumcodereview.appspot.com/2410333006/diff/240001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode318 content/browser/service_worker/service_worker_fetch_dispatcher.cc:318: request.resource_type = RESOURCE_TYPE_SUB_RESOURCE; On 2016/10/19 06:43:18, falken ...
4 years, 2 months ago (2016-10-19 07:02:11 UTC) #57
horo
sadrul@ Please review content/browser/renderer_host/render_process_host_impl.* dcheng@ Could you please review this change as a security reviewer? ...
4 years, 2 months ago (2016-10-19 07:14:15 UTC) #59
yhirano
I have a question: I am making a change to MojoAsyncResourceHandler: It will interact with ...
4 years, 2 months ago (2016-10-19 12:03:41 UTC) #60
sadrul
https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc#newcode3016 content/browser/renderer_host/render_process_host_impl.cc:3016: mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { This doesn't need to be a ...
4 years, 2 months ago (2016-10-19 14:42:44 UTC) #61
horo
https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc#newcode3016 content/browser/renderer_host/render_process_host_impl.cc:3016: mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { On 2016/10/19 14:42:43, sadrul wrote: > ...
4 years, 2 months ago (2016-10-19 14:48:41 UTC) #62
mmenke
My signoff still stands, just hadn't thought about thread safety (Which looks fine in this ...
4 years, 2 months ago (2016-10-19 14:56:02 UTC) #63
sadrul
https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc#newcode3016 content/browser/renderer_host/render_process_host_impl.cc:3016: mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { On 2016/10/19 14:48:41, horo wrote: > ...
4 years, 2 months ago (2016-10-19 15:13:31 UTC) #64
horo
https://codereview.chromium.org/2410333006/diff/280001/content/browser/loader/resource_dispatcher_host_impl.h File content/browser/loader/resource_dispatcher_host_impl.h (right): https://codereview.chromium.org/2410333006/diff/280001/content/browser/loader/resource_dispatcher_host_impl.h#newcode342 content/browser/loader/resource_dispatcher_host_impl.h:342: int MakeRequestID() { return --request_id_; } On 2016/10/19 14:56:02, ...
4 years, 2 months ago (2016-10-19 15:18:53 UTC) #67
horo
https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2410333006/diff/280001/content/browser/renderer_host/render_process_host_impl.cc#newcode3016 content/browser/renderer_host/render_process_host_impl.cc:3016: mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { On 2016/10/19 15:13:31, sadrul wrote: > ...
4 years, 2 months ago (2016-10-19 16:08:02 UTC) #72
horo
On 2016/10/19 12:03:41, yhirano wrote: > I have a question: I am making a change ...
4 years, 2 months ago (2016-10-19 16:23:58 UTC) #73
sadrul
lgtm
4 years, 2 months ago (2016-10-19 16:34:42 UTC) #74
dcheng
mojo LGTM https://codereview.chromium.org/2410333006/diff/320001/content/browser/service_worker/service_worker_provider_host.cc File content/browser/service_worker/service_worker_provider_host.cc (right): https://codereview.chromium.org/2410333006/diff/320001/content/browser/service_worker/service_worker_provider_host.cc#newcode344 content/browser/service_worker/service_worker_provider_host.cc:344: // |dispatcher_host_| may be null in some ...
4 years, 2 months ago (2016-10-20 02:35:51 UTC) #77
horo
Thank you! https://codereview.chromium.org/2410333006/diff/320001/content/browser/service_worker/service_worker_url_request_job.h File content/browser/service_worker/service_worker_url_request_job.h (right): https://codereview.chromium.org/2410333006/diff/320001/content/browser/service_worker/service_worker_url_request_job.h#newcode98 content/browser/service_worker/service_worker_url_request_job.h:98: const MojoURLLoaderFactoryGetter& url_loader_factory_getter, On 2016/10/20 02:35:50, dcheng ...
4 years, 2 months ago (2016-10-20 03:05:14 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2410333006/340001
4 years, 2 months ago (2016-10-20 05:36:28 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2410333006/340001
4 years, 2 months ago (2016-10-20 05:37:10 UTC) #84
commit-bot: I haz the power
Committed patchset #13 (id:340001)
4 years, 2 months ago (2016-10-20 06:52:11 UTC) #86
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:16:27 UTC) #88
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/36762af751e2100946cff85db993910e8a402423
Cr-Commit-Position: refs/heads/master@{#426423}

Powered by Google App Engine
This is Rietveld 408576698