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

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

Created:
5 years, 2 months ago by clamy
Modified:
5 years, 1 month ago
Reviewers:
kinuko, michaeln, nasko
CC:
chromium-reviews, michaeln, 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, danakj
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. This CL makes the ServiceWorker architecture work with PlzNavigate enabled. This is done by allowing the browser to pre-create a ServiceWorkerProviderHost during navigations if needed. If the navigation is successful, the renderer chosen to commit the navigation will create a matching ServiceWorkerNetworkProvider. If no ServiceWorkerProviderHost was pre-created, the renderer creates a ServiceWorkerNetworkProvider in the traditional way. This is a continuation of https://codereview.chromium.org/1294243004/ by fdegans@ following his departure from the team. BUG=440463 Committed: https://crrev.com/2a7a25b565fd4b702bb12ce40f16284d965a11ad Cr-Commit-Position: refs/heads/master@{#356310}

Patch Set 1 #

Patch Set 2 : #

Total comments: 23

Patch Set 3 : Rebase #

Patch Set 4 : Addressed comments #

Total comments: 4

Patch Set 5 : Rebase #

Patch Set 6 : Addressed Kinuko's comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+736 lines, -92 lines) Patch
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 3 chunks +11 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 2 chunks +30 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_request.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 4 chunks +14 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request_info.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request_info.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/loader/navigation_url_loader.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/navigation_url_loader_factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl.cc View 1 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl_core.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl_core.cc View 1 4 chunks +3 lines, -2 lines 0 comments Download
M content/browser/loader/navigation_url_loader_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 3 chunks +14 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.h View 1 2 3 4 5 3 chunks +16 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 4 chunks +33 lines, -4 lines 0 comments Download
A content/browser/service_worker/service_worker_navigation_handle.h View 1 1 chunk +78 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_navigation_handle.cc View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_navigation_handle_core.h View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_navigation_handle_core.cc View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 3 chunks +19 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 7 chunks +68 lines, -18 lines 1 comment Download
M content/browser/service_worker/service_worker_request_handler.h View 2 chunks +14 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 5 chunks +103 lines, -27 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.h View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 1 2 3 4 5 3 chunks +72 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/common/navigation_params.h View 1 2 3 4 1 chunk +8 lines, -4 lines 0 comments Download
M content/common/navigation_params.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_utils.h View 2 chunks +7 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 2 chunks +14 lines, -14 lines 0 comments Download
M content/test/test_navigation_url_loader_factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/test/test_navigation_url_loader_factory.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 22 (4 generated)
clamy
@nasko, michaeln, kinuko: PTAL This is a continuation of fdegans@ patch from https://codereview.chromium.org/1294243004/. I tried ...
5 years, 2 months ago (2015-10-14 14:08:08 UTC) #2
clamy
@michealn, kinuko: friendly ping :)
5 years, 2 months ago (2015-10-19 12:11:35 UTC) #3
kinuko
Sorry for very slow review, it took some time for me to take a look. ...
5 years, 2 months ago (2015-10-20 14:46:07 UTC) #4
michaeln
lgtm, thnx for picking it up! i have a question about potential race between the ...
5 years, 2 months ago (2015-10-20 22:12:53 UTC) #5
nasko
Reviewed some of the CL, but not the full thing. https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_handle_impl.cc#newcode65 ...
5 years, 2 months ago (2015-10-20 23:07:42 UTC) #6
clamy
Thanks! I'll be adding tests in the next patch set. https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_handle_impl.cc#newcode65 ...
5 years, 2 months ago (2015-10-21 16:33:48 UTC) #7
michaeln
https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_handle_impl.h File content/browser/frame_host/navigation_handle_impl.h (right): https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_handle_impl.h#newcode51 content/browser/frame_host/navigation_handle_impl.h:51: // transferred to the RenderFrameHost in which the navigation ...
5 years, 2 months ago (2015-10-21 20:07:29 UTC) #8
nasko
https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_request.cc#newcode277 content/browser/frame_host/navigation_request.cc:277: (frame_tree_node_->current_replication_state().sandbox_flags & On 2015/10/21 16:33:48, clamy wrote: > On ...
5 years, 2 months ago (2015-10-21 22:28:08 UTC) #9
kinuko
https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_request.cc#newcode277 content/browser/frame_host/navigation_request.cc:277: (frame_tree_node_->current_replication_state().sandbox_flags & On 2015/10/21 16:33:48, clamy wrote: > On ...
5 years, 2 months ago (2015-10-22 12:16:02 UTC) #10
nasko
On 2015/10/22 12:16:02, kinuko wrote: > https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_request.cc > File content/browser/frame_host/navigation_request.cc (right): > > https://codereview.chromium.org/1399363004/diff/20001/content/browser/frame_host/navigation_request.cc#newcode277 > ...
5 years, 2 months ago (2015-10-22 22:40:25 UTC) #11
nasko
With the sandboxed flags and SW interaction issue resolved, this now LGTM.
5 years, 2 months ago (2015-10-22 22:41:17 UTC) #12
kinuko
Thanks for checking. What is/was not entirely clear to me is how immediately sandbox flag ...
5 years, 2 months ago (2015-10-23 01:02:28 UTC) #13
kinuko
lgtm https://codereview.chromium.org/1399363004/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/1399363004/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode767 content/browser/service_worker/service_worker_dispatcher_host.cc:767: } On 2015/10/20 22:12:53, michaeln wrote: > On ...
5 years, 2 months ago (2015-10-23 02:37:45 UTC) #14
clamy
Thanks! https://codereview.chromium.org/1399363004/diff/60001/content/browser/service_worker/service_worker_context_core.h File content/browser/service_worker/service_worker_context_core.h (right): https://codereview.chromium.org/1399363004/diff/60001/content/browser/service_worker/service_worker_context_core.h#newcode233 content/browser/service_worker/service_worker_context_core.h:233: } On 2015/10/23 02:37:45, kinuko wrote: > (Personally ...
5 years, 1 month ago (2015-10-27 14:46:13 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1399363004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1399363004/100001
5 years, 1 month ago (2015-10-27 14:46:42 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-10-27 16:20:57 UTC) #19
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/2a7a25b565fd4b702bb12ce40f16284d965a11ad Cr-Commit-Position: refs/heads/master@{#356310}
5 years, 1 month ago (2015-10-27 16:22:25 UTC) #20
danakj
5 years, 1 month ago (2015-10-27 18:20:26 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/1399363004/diff/100001/content/browser/servic...
File content/browser/service_worker/service_worker_provider_host.cc (right):

https://codereview.chromium.org/1399363004/diff/100001/content/browser/servic...
content/browser/service_worker/service_worker_provider_host.cc:82:
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
Hi, I randomly came across this. Please use DCHECK instead of CHECK whenever it
is possible. CHECK adds strings and code to the binary we ship to our users.

Generally you should only use CHECK while fishing out stack traces for a bug,
and switch back to DCHECK after.

https://www.chromium.org/developers/coding-style#TOC-CHECK-DCHECK-and-NOTREAC...

Powered by Google App Engine
This is Rietveld 408576698