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

Issue 600393004: [ServiceWorker] Set FetchRequestMode and handle wasFetchedViaServiceWorker. (Closed)

Created:
6 years, 3 months ago by horo
Modified:
6 years, 2 months ago
Reviewers:
tkent, haraken, yhirano, falken
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, gavinp+loader_chromium.org, horo+watch_chromium.org, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[ServiceWorker] Set FetchRequestMode and handle wasFetchedViaServiceWorker. This cl sets FetchRequestMode in the renderer process. These flags are used in the ServiceWorker. This cl also includes the network fallback logic in the renderer process. Currently the network fallback which is executed when FetchEvent.respondWith() is not called in the ServiceWorker is executed in the browser process. But if we send a CORS fetch request the network fallback should be executed in the renderer process. In such a case wasFetchedViaServiceWorker flag of the response from the browser process is set. This cl adds the check of the flag and introduces the fallback logic in ResourceLoader and DocumentThreadableLoader. This cl depends on 634813002, 629953003 and 635693003. BUG=416371, 408507 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183502

Patch Set 1 : #

Patch Set 2 : Pass DocumentLoader (aka WebDataSource) to isControlledByServiceWorker #

Patch Set 3 : add setFetchCredentialsMode in PingLoader::PingLoader() #

Total comments: 23

Patch Set 4 : add comment #

Total comments: 10

Patch Set 5 : incrporated yhirano's comment #

Patch Set 6 : remove console.log from fetch-request-image.html #

Total comments: 14

Patch Set 7 : incorporated falken's comment #

Total comments: 4

Patch Set 8 : incorporated falken's comment #

Patch Set 9 : fix fetch-cors-xhr.html #

Patch Set 10 : delete fetch-cors-xhr-expected.txt #

Unified diffs Side-by-side diffs Delta from patch set Stats (+652 lines, -173 lines) Patch
M LayoutTests/http/tests/serviceworker/fetch-access-control.html View 1 chunk +4 lines, -19 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html View 1 2 3 4 5 6 7 3 chunks +12 lines, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/fetch-cors-xhr.html View 1 2 3 4 5 6 7 3 chunks +12 lines, -1 line 0 comments Download
D LayoutTests/http/tests/serviceworker/fetch-cors-xhr-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -8 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/fetch-request-image.html View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-canvas-tainting-iframe.html View 2 chunks +214 lines, -44 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-cors-xhr-iframe.html View 1 2 3 4 2 chunks +160 lines, -62 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/fetch-request-image-iframe.html View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/fetch-request-image-worker.js View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html View 1 2 3 4 7 chunks +32 lines, -6 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-worker.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/test-helpers.js View 1 chunk +18 lines, -0 lines 0 comments Download
M Source/core/fetch/FetchRequest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceLoader.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceLoader.cpp View 1 2 3 4 5 6 2 chunks +31 lines, -12 lines 0 comments Download
M Source/core/fetch/ResourceLoaderHost.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/loader/DocumentThreadableLoader.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/loader/DocumentThreadableLoader.cpp View 1 2 3 4 5 6 5 chunks +49 lines, -20 lines 0 comments Download

Messages

Total messages: 74 (37 generated)
horo
yhirano@ Could you please review this?
6 years, 2 months ago (2014-10-06 09:35:03 UTC) #15
yhirano
On 2014/10/06 09:35:03, horo wrote: > yhirano@ > Could you please review this? In the ...
6 years, 2 months ago (2014-10-07 05:57:09 UTC) #16
horo
On 2014/10/07 05:57:09, yhirano wrote: > On 2014/10/06 09:35:03, horo wrote: > > yhirano@ > ...
6 years, 2 months ago (2014-10-07 06:35:34 UTC) #17
yhirano
https://codereview.chromium.org/600393004/diff/300001/Source/core/fetch/CrossOriginAccessControl.cpp File Source/core/fetch/CrossOriginAccessControl.cpp (right): https://codereview.chromium.org/600393004/diff/300001/Source/core/fetch/CrossOriginAccessControl.cpp#newcode67 Source/core/fetch/CrossOriginAccessControl.cpp:67: request.setAllowStoredCredentials(allowCredentials == AllowStoredCredentials); Requiring to call two methods in ...
6 years, 2 months ago (2014-10-07 08:03:15 UTC) #18
horo
As I talked offline I changed this cl to focus only on setting FetchRequestMode. It ...
6 years, 2 months ago (2014-10-08 02:34:56 UTC) #20
yhirano
https://codereview.chromium.org/600393004/diff/340001/Source/core/fetch/ResourceLoader.cpp File Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/600393004/diff/340001/Source/core/fetch/ResourceLoader.cpp#newcode153 Source/core/fetch/ResourceLoader.cpp:153: m_fallbackRequest = adoptPtr(new ResourceRequest(m_request)); Can you tell me why ...
6 years, 2 months ago (2014-10-08 05:28:55 UTC) #21
horo
Ah. Sorry I deleted patchset 340001 by mistake. On 2014/10/08 05:28:55, yhirano wrote: > https://codereview.chromium.org/600393004/diff/340001/Source/core/fetch/ResourceLoader.cpp ...
6 years, 2 months ago (2014-10-08 06:52:15 UTC) #24
yhirano
Please rewrite the title and the description. https://codereview.chromium.org/600393004/diff/380001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html File LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html (right): https://codereview.chromium.org/600393004/diff/380001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html#newcode6 LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html:6: <body> [optional] ...
6 years, 2 months ago (2014-10-08 09:31:39 UTC) #25
horo
https://codereview.chromium.org/600393004/diff/380001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html File LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html (right): https://codereview.chromium.org/600393004/diff/380001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html#newcode6 LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html:6: <body> On 2014/10/08 09:31:39, yhirano wrote: > [optional] You ...
6 years, 2 months ago (2014-10-08 10:02:47 UTC) #27
yhirano
lgtm
6 years, 2 months ago (2014-10-09 03:00:18 UTC) #29
horo
tkent@ Could you please review Source/core/*?
6 years, 2 months ago (2014-10-09 03:07:04 UTC) #31
yhirano
On 2014/10/09 03:07:04, horo wrote: > tkent@ > Could you please review Source/core/*? tkent@ seems ...
6 years, 2 months ago (2014-10-09 03:22:19 UTC) #32
horo
On 2014/10/09 03:22:19, yhirano wrote: > On 2014/10/09 03:07:04, horo wrote: > > tkent@ > ...
6 years, 2 months ago (2014-10-09 03:24:04 UTC) #33
horo
haraken@ Could you please review Source/core/*?
6 years, 2 months ago (2014-10-09 03:24:28 UTC) #35
haraken
On 2014/10/09 03:24:28, horo wrote: > haraken@ > Could you please review Source/core/*? Hmm, I'm ...
6 years, 2 months ago (2014-10-09 04:30:45 UTC) #36
horo
On 2014/10/09 04:30:45, haraken wrote: > On 2014/10/09 03:24:28, horo wrote: > > haraken@ > ...
6 years, 2 months ago (2014-10-09 04:43:07 UTC) #37
horo
falken@ Could you please review?
6 years, 2 months ago (2014-10-09 04:43:26 UTC) #39
falken
Does this CL mean the fallback to network code on the browser-side is no longer ...
6 years, 2 months ago (2014-10-09 05:38:34 UTC) #40
horo
> Does this CL mean the fallback to network code on the browser-side is no ...
6 years, 2 months ago (2014-10-09 07:27:53 UTC) #41
falken
lgtm. i skimmed over the longer tests as yhirano reviewed https://codereview.chromium.org/600393004/diff/480001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html File LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html (right): https://codereview.chromium.org/600393004/diff/480001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html#newcode19 ...
6 years, 2 months ago (2014-10-09 07:56:51 UTC) #42
horo
Thank you! https://codereview.chromium.org/600393004/diff/480001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html File LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html (right): https://codereview.chromium.org/600393004/diff/480001/LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html#newcode19 LayoutTests/http/tests/serviceworker/fetch-canvas-tainting.html:19: return service_worker_unregister_and_register(t, SCRIPT, SCOPE); On 2014/10/09 07:56:51, ...
6 years, 2 months ago (2014-10-09 08:12:28 UTC) #43
horo
haraken@ Could you please take a look?
6 years, 2 months ago (2014-10-09 08:13:00 UTC) #44
haraken
LGTM given the LG of falken and hirano-san.
6 years, 2 months ago (2014-10-09 08:24:17 UTC) #45
horo
On 2014/10/09 08:24:17, haraken wrote: > LGTM given the LG of falken and hirano-san. Thank ...
6 years, 2 months ago (2014-10-09 08:32:07 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/500001
6 years, 2 months ago (2014-10-09 08:32:39 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: android_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/android_blink_compile_dbg/builds/15275)
6 years, 2 months ago (2014-10-09 09:09:34 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/500001
6 years, 2 months ago (2014-10-09 09:11:37 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/28460)
6 years, 2 months ago (2014-10-09 10:31:55 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/520001
6 years, 2 months ago (2014-10-09 14:57:25 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/17076)
6 years, 2 months ago (2014-10-09 15:06:51 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/540001
6 years, 2 months ago (2014-10-09 15:29:31 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/28510)
6 years, 2 months ago (2014-10-09 16:31:02 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/620001
6 years, 2 months ago (2014-10-09 20:46:14 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/28561)
6 years, 2 months ago (2014-10-09 21:56:17 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/820001
6 years, 2 months ago (2014-10-10 00:32:31 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393004/820001
6 years, 2 months ago (2014-10-10 02:58:52 UTC) #73
commit-bot: I haz the power
6 years, 2 months ago (2014-10-10 03:51:16 UTC) #74
Message was sent while issue was closed.
Committed patchset #10 (id:820001) as 183502

Powered by Google App Engine
This is Rietveld 408576698