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

Issue 2045383002: PlzNavigate: detect when a ServiceWorker is present (Closed)

Created:
4 years, 6 months ago by clamy
Modified:
4 years, 5 months ago
Reviewers:
falken, 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, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, horo+watch_chromium.org, loading-reviews_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: detect when a ServiceWorker is present This CL is the first step in PlzNavigate support of ServiceWorker. Before starting a navigation, it checks whether a ServiceWorker is registered for the url. If yes, it bails out. Currently this cancel the navigation. The next step is ot have the navigation sent to the renderer to be handled by the ServiceWorker. This CL also removes the code that was introduced as part as the previous attempt to support ServiceWorker and is no longer needed with the current plan. BUG=440463 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/7a7befa5297e4b50439e16a97dd541dfb438aaaf Cr-Commit-Position: refs/heads/master@{#402791}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Calling FindReadyRegistartionForDocument #

Total comments: 4

Patch Set 3 : Addressed comments #

Total comments: 5

Patch Set 4 : Addressed comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -521 lines) Patch
M content/browser/bad_message.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/navigation_handle_impl.h View 1 3 chunks +0 lines, -14 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 2 chunks +0 lines, -8 lines 0 comments Download
M content/browser/frame_host/navigation_request.h View 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 5 chunks +29 lines, -43 lines 0 comments Download
M content/browser/loader/navigation_url_loader.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/loader/navigation_url_loader.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/loader/navigation_url_loader_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/navigation_url_loader_impl.h View 2 chunks +9 lines, -5 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl.cc View 4 chunks +8 lines, -5 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl_core.h View 1 4 chunks +14 lines, -2 lines 0 comments Download
M content/browser/loader/navigation_url_loader_impl_core.cc View 1 2 3 5 chunks +46 lines, -7 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 1 chunk +3 lines, -5 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 2 chunks +1 line, -11 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 chunks +8 lines, -35 lines 0 comments Download
D content/browser/service_worker/service_worker_navigation_handle.h View 1 chunk +0 lines, -78 lines 0 comments Download
D content/browser/service_worker/service_worker_navigation_handle.cc View 1 chunk +0 lines, -35 lines 0 comments Download
D content/browser/service_worker/service_worker_navigation_handle_core.h View 1 chunk +0 lines, -58 lines 0 comments Download
D content/browser/service_worker/service_worker_navigation_handle_core.cc View 1 chunk +0 lines, -65 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.h View 1 2 3 2 chunks +0 lines, -14 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 2 3 2 chunks +0 lines, -49 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 1 chunk +2 lines, -0 lines 1 comment Download
M content/child/service_worker/service_worker_network_provider.h View 2 chunks +0 lines, -8 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 1 2 5 chunks +10 lines, -48 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/common/navigation_params.h View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M content/common/navigation_params.cc View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M content/test/test_navigation_url_loader_delegate.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/test/test_navigation_url_loader_delegate.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/test/test_navigation_url_loader_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_navigation_url_loader_factory.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (8 generated)
clamy
@falken: PTAL at the changes in service_worker https://codereview.chromium.org/2045383002/diff/1/content/browser/loader/navigation_url_loader_impl_core.cc File content/browser/loader/navigation_url_loader_impl_core.cc (right): https://codereview.chromium.org/2045383002/diff/1/content/browser/loader/navigation_url_loader_impl_core.cc#newcode57 content/browser/loader/navigation_url_loader_impl_core.cc:57: service_worker_context_wrapper->CheckHasServiceWorker( @falken: ...
4 years, 6 months ago (2016-06-08 17:02:42 UTC) #3
falken
I'm wondering about racy cases like SW is being installed or being unregistered around the ...
4 years, 6 months ago (2016-06-09 20:15:49 UTC) #4
clamy
Thanks! My idea is to do the following: 1) Check if there is a ServiceWorker ...
4 years, 6 months ago (2016-06-23 15:51:43 UTC) #5
falken
service worker bits lgtm https://codereview.chromium.org/2045383002/diff/1/content/browser/loader/navigation_url_loader_impl_core.cc File content/browser/loader/navigation_url_loader_impl_core.cc (right): https://codereview.chromium.org/2045383002/diff/1/content/browser/loader/navigation_url_loader_impl_core.cc#newcode57 content/browser/loader/navigation_url_loader_impl_core.cc:57: service_worker_context_wrapper->CheckHasServiceWorker( On 2016/06/23 15:51:43, clamy ...
4 years, 6 months ago (2016-06-24 08:21:52 UTC) #6
clamy
Thanks! @nasko: PTAL https://codereview.chromium.org/2045383002/diff/20001/content/browser/loader/navigation_url_loader_impl_core.cc File content/browser/loader/navigation_url_loader_impl_core.cc (right): https://codereview.chromium.org/2045383002/diff/20001/content/browser/loader/navigation_url_loader_impl_core.cc#newcode159 content/browser/loader/navigation_url_loader_impl_core.cc:159: loader_)); On 2016/06/24 08:21:51, falken wrote: ...
4 years, 6 months ago (2016-06-24 11:16:55 UTC) #9
nasko
IPC LGTM https://codereview.chromium.org/2045383002/diff/40001/content/browser/loader/navigation_url_loader_impl_core.cc File content/browser/loader/navigation_url_loader_impl_core.cc (right): https://codereview.chromium.org/2045383002/diff/40001/content/browser/loader/navigation_url_loader_impl_core.cc#newcode167 content/browser/loader/navigation_url_loader_impl_core.cc:167: if (ResourceDispatcherHostImpl::Get()) { nit: if (!RDH::Get()) return; ...
4 years, 5 months ago (2016-06-27 16:54:26 UTC) #10
clamy
Thanks! https://codereview.chromium.org/2045383002/diff/40001/content/browser/loader/navigation_url_loader_impl_core.cc File content/browser/loader/navigation_url_loader_impl_core.cc (right): https://codereview.chromium.org/2045383002/diff/40001/content/browser/loader/navigation_url_loader_impl_core.cc#newcode167 content/browser/loader/navigation_url_loader_impl_core.cc:167: if (ResourceDispatcherHostImpl::Get()) { On 2016/06/27 16:54:26, nasko wrote: ...
4 years, 5 months ago (2016-06-29 12:15:51 UTC) #11
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/2045383002/60001
4 years, 5 months ago (2016-06-29 12:16:17 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-06-29 13:56:15 UTC) #16
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/7a7befa5297e4b50439e16a97dd541dfb438aaaf Cr-Commit-Position: refs/heads/master@{#402791}
4 years, 5 months ago (2016-06-29 13:57:27 UTC) #18
falken
https://codereview.chromium.org/2045383002/diff/40001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (left): https://codereview.chromium.org/2045383002/diff/40001/content/browser/service_worker/service_worker_dispatcher_host.cc#oldcode788 content/browser/service_worker/service_worker_dispatcher_host.cc:788: this, bad_message::SWDH_PROVIDER_CREATED_NO_HOST); On 2016/06/29 12:15:51, clamy wrote: > On ...
4 years, 5 months ago (2016-06-30 00:50:11 UTC) #19
clamy
4 years, 5 months ago (2016-06-30 08:58:14 UTC) #20
Message was sent while issue was closed.
On 2016/06/30 00:50:11, falken wrote:
>
https://codereview.chromium.org/2045383002/diff/40001/content/browser/service...
> File content/browser/service_worker/service_worker_dispatcher_host.cc (left):
> 
>
https://codereview.chromium.org/2045383002/diff/40001/content/browser/service...
> content/browser/service_worker/service_worker_dispatcher_host.cc:788: this,
> bad_message::SWDH_PROVIDER_CREATED_NO_HOST);
> On 2016/06/29 12:15:51, clamy wrote:
> > On 2016/06/27 16:54:26, nasko wrote:
> > > Should this bad message reason be removed/nullified/overwritten?
> > 
> > According to the bad_message file it can't be removed. I added a comment
> saying
> > it was obsolete.
> 
> This is still used in line 761. I'll make a followup patch to remove the
> comment.

Sorry about that, thanks for fixing it!

Powered by Google App Engine
This is Rietveld 408576698