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

Issue 527713002: [ServiceWorker] Introduce skip_service_worker flag and remove LOAD_BYPASS_CACHE check. (Closed)

Created:
6 years, 3 months ago by horo
Modified:
6 years, 3 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[ServiceWorker] Introduce skip_service_worker flag and remove LOAD_BYPASS_CACHE check. If the request is a force refresh (shift+refresh) the request should not be handled by the ServiceWorker. https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker-controller Currently we are checking LOAD_BYPASS_CACHE flag of net::URLRequest in ServiceWorkerControlleeRequestHandler::MaybeCreateJob(). But this flag is set not only when shift+refresh but also when devtool's "Disable cache" is checked. To distinguish them, I added skipServiceWorker flag to blink::WebURLRequest and blink::ResourceRequest in https://codereview.chromium.org/527703002/. This cl changes the follwings - Introduce skip_service_worker flag to content::RequestExtraData and ResourceHostMsg_Request. - Remove the check of LOAD_BYPASS_CACHE in ServiceWorkerControlleeRequestHandler::MaybeCreateJob(). - Check skip_service_worker flag in ServiceWorkerRequestHandler::InitializeHandler() and call provider_host->SetDocumentUrl() when the request is main resource request. TEST=none BUG=402093 Committed: https://crrev.com/258fc42376fc25bb4fdfbc372ce53abe39988797 Cr-Commit-Position: refs/heads/master@{#293490}

Patch Set 1 #

Total comments: 2

Patch Set 2 : s/SKIP_SERVICE_WORKER/BYPASS_SERVICE_WORKER/ #

Patch Set 3 : Check skipServiceWorker in RenderFrameImpl::willSendRequest() #

Total comments: 1

Patch Set 4 : Introduce skip_service_worker flag #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -10 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M content/child/request_extra_data.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M content/child/request_extra_data.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/child/resource_dispatcher.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/common/resource_messages.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
horo
nhiroki@ Could you please review this?
6 years, 3 months ago (2014-09-01 05:27:15 UTC) #2
nhiroki
lgtm https://codereview.chromium.org/527713002/diff/1/net/base/load_flags_list.h File net/base/load_flags_list.h (right): https://codereview.chromium.org/527713002/diff/1/net/base/load_flags_list.h#newcode130 net/base/load_flags_list.h:130: LOAD_FLAG(SKIP_SERVICE_WORKER, 1 << 29) 'BYPASS' seems to be ...
6 years, 3 months ago (2014-09-01 05:58:23 UTC) #3
horo
thank you! https://codereview.chromium.org/527713002/diff/1/net/base/load_flags_list.h File net/base/load_flags_list.h (right): https://codereview.chromium.org/527713002/diff/1/net/base/load_flags_list.h#newcode130 net/base/load_flags_list.h:130: LOAD_FLAG(SKIP_SERVICE_WORKER, 1 << 29) On 2014/09/01 05:58:22, ...
6 years, 3 months ago (2014-09-01 06:15:47 UTC) #4
horo
brettw@chromium.org: Please review changes in content/child/web_url_loader_impl.cc mmenke@chromium.org: Please review changes in net/base/load_flags_list.h Thank you.
6 years, 3 months ago (2014-09-01 06:29:31 UTC) #6
mmenke
On 2014/09/01 06:29:31, horo wrote: > mailto:brettw@chromium.org: > Please review changes in content/child/web_url_loader_impl.cc > > ...
6 years, 3 months ago (2014-09-01 13:01:22 UTC) #7
horo
On 2014/09/01 13:01:22, mmenke wrote: > On 2014/09/01 06:29:31, horo wrote: > > mailto:brettw@chromium.org: > ...
6 years, 3 months ago (2014-09-03 06:06:24 UTC) #8
nhiroki
LGTM from service worker's point of view.
6 years, 3 months ago (2014-09-03 07:33:55 UTC) #9
mmenke
On 2014/09/03 07:33:55, nhiroki wrote: > LGTM from service worker's point of view. This approach ...
6 years, 3 months ago (2014-09-03 11:44:58 UTC) #10
horo
brettw@ Could you please review this?
6 years, 3 months ago (2014-09-03 12:07:42 UTC) #11
michaeln
https://codereview.chromium.org/527713002/diff/40001/content/browser/service_worker/service_worker_controllee_request_handler.cc File content/browser/service_worker/service_worker_controllee_request_handler.cc (left): https://codereview.chromium.org/527713002/diff/40001/content/browser/service_worker/service_worker_controllee_request_handler.cc#oldcode60 content/browser/service_worker/service_worker_controllee_request_handler.cc:60: provider_host_->SetDocumentUrl( this change puts the browser side into an ...
6 years, 3 months ago (2014-09-03 20:18:58 UTC) #13
horo
On 2014/09/03 20:18:58, michaeln wrote: > https://codereview.chromium.org/527713002/diff/40001/content/browser/service_worker/service_worker_controllee_request_handler.cc > File content/browser/service_worker/service_worker_controllee_request_handler.cc > (left): > > https://codereview.chromium.org/527713002/diff/40001/content/browser/service_worker/service_worker_controllee_request_handler.cc#oldcode60 ...
6 years, 3 months ago (2014-09-04 04:34:29 UTC) #14
michaeln1
lgtm, thnx!
6 years, 3 months ago (2014-09-04 19:44:47 UTC) #15
michaeln
and lgtm 2
6 years, 3 months ago (2014-09-04 19:45:53 UTC) #16
horo
nasko@ Could you please review content/common/resource_messages.h?
6 years, 3 months ago (2014-09-04 23:20:12 UTC) #18
horo
jochen@ Could you please review content/child/* and content/renderer/*?
6 years, 3 months ago (2014-09-04 23:22:02 UTC) #21
nasko
IPC LGTM
6 years, 3 months ago (2014-09-04 23:30:25 UTC) #22
jochen (gone - plz use gerrit)
lgtm
6 years, 3 months ago (2014-09-05 08:31:23 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/horo@chromium.org/527713002/60001
6 years, 3 months ago (2014-09-05 08:56:20 UTC) #26
commit-bot: I haz the power
Committed patchset #4 (id:60001) as ddb7698c0dfa651553e367fb5db64f06a1ce6ca7
6 years, 3 months ago (2014-09-05 10:16:33 UTC) #27
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:38:29 UTC) #28
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/258fc42376fc25bb4fdfbc372ce53abe39988797
Cr-Commit-Position: refs/heads/master@{#293490}

Powered by Google App Engine
This is Rietveld 408576698