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

Issue 1313733006: Allowing registering arbitrary schemes as supporting the fetch API. (Closed)

Created:
5 years, 4 months ago by not at google - send to devlin
Modified:
5 years, 3 months ago
CC:
blink-reviews, falken
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Allowing registering arbitrary schemes as supporting the fetch API. Currently it's only exposed to the HTTP family, but now that Chrome extensions support service workers they need to support the fetch API. This patch adds registerURLSchemeAsSupportingFetchAPI to the Blink API, queried by the fetch API code as shouldTreatURLSchemeAsSupportingFetchAPI. BUG=466876 R=yhirano@chromium.org, dcheng@chromium.org, pdr@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201492

Patch Set 1 #

Total comments: 2

Patch Set 2 : SupportingFetchAPI #

Total comments: 14

Patch Set 3 : comment #

Patch Set 4 : comments #

Patch Set 5 : rebase #

Total comments: 1

Patch Set 6 : negation fix #

Total comments: 3

Patch Set 7 : http-like #2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -3 lines) Patch
M Source/modules/fetch/FetchManager.cpp View 1 2 3 4 5 4 chunks +6 lines, -3 lines 0 comments Download
M Source/platform/weborigin/SchemeRegistry.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/platform/weborigin/SchemeRegistry.cpp View 1 2 chunks +27 lines, -0 lines 0 comments Download
M Source/web/WebSecurityPolicy.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M public/web/WebSecurityPolicy.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (8 generated)
not at google - send to devlin
Does this look right? +falken for the SW context.
5 years, 4 months ago (2015-08-25 00:25:32 UTC) #1
falken
Fetch and SW are now totally separate APIs (although historically Fetch was implemented for SW ...
5 years, 4 months ago (2015-08-25 03:43:14 UTC) #3
falken
+hiroshige
5 years, 4 months ago (2015-08-25 05:00:23 UTC) #5
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1313733006/diff/1/Source/modules/fetch/FetchManager.cpp File Source/modules/fetch/FetchManager.cpp (right): https://codereview.chromium.org/1313733006/diff/1/Source/modules/fetch/FetchManager.cpp#newcode460 Source/modules/fetch/FetchManager.cpp:460: ASSERT(SchemeRegistry::ShouldTreatURLShemeAsAllowingServiceWorkers(m_request->url().procol())); Maybe just WIP. But Sheme -> Scheme Should ...
5 years, 4 months ago (2015-08-25 05:16:48 UTC) #7
tyoshino (SeeGerritForStatus)
On 2015/08/25 03:43:14, falken wrote: > Fetch and SW are now totally separate APIs (although ...
5 years, 4 months ago (2015-08-25 05:19:20 UTC) #8
not at google - send to devlin
Thanks for the feedback. PTAL. I've uploaded the Chromium side here: https://codereview.chromium.org/1310953003 for some context. ...
5 years, 4 months ago (2015-08-25 19:58:50 UTC) #10
not at google - send to devlin
+dcheng for Source/web and public/web. Assuming this looks good to the Fetch API folks, does ...
5 years, 4 months ago (2015-08-25 19:59:55 UTC) #12
not at google - send to devlin
Doing some more reviewers shuffling. - tyoshino@ you seem to be looking at the code, ...
5 years, 4 months ago (2015-08-25 20:06:35 UTC) #13
dcheng
https://codereview.chromium.org/1313733006/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp File Source/platform/weborigin/SchemeRegistry.cpp (right): https://codereview.chromium.org/1313733006/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp#newcode377 Source/platform/weborigin/SchemeRegistry.cpp:377: if (scheme.isEmpty()) Out of curiosity, any particular reason to ...
5 years, 4 months ago (2015-08-25 20:07:32 UTC) #14
not at google - send to devlin
mkwst -> pdr.
5 years, 4 months ago (2015-08-25 20:07:55 UTC) #16
not at google - send to devlin
https://codereview.chromium.org/1313733006/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp File Source/platform/weborigin/SchemeRegistry.cpp (right): https://codereview.chromium.org/1313733006/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp#newcode377 Source/platform/weborigin/SchemeRegistry.cpp:377: if (scheme.isEmpty()) On 2015/08/25 20:07:32, dcheng wrote: > Out ...
5 years, 4 months ago (2015-08-25 20:09:03 UTC) #17
pdr.
I don't know this code very well so I'll apologize in advance for the noob ...
5 years, 4 months ago (2015-08-25 21:25:10 UTC) #18
not at google - send to devlin
https://codereview.chromium.org/1313733006/diff/40001/Source/modules/fetch/FetchManager.cpp File Source/modules/fetch/FetchManager.cpp (right): https://codereview.chromium.org/1313733006/diff/40001/Source/modules/fetch/FetchManager.cpp#newcode444 Source/modules/fetch/FetchManager.cpp:444: if (SchemeRegistry::shouldTreatURLSchemeAsSupportingFetchAPI(m_request->url().protocol())) { On 2015/08/25 21:25:09, pdr wrote: > ...
5 years, 3 months ago (2015-08-25 22:04:45 UTC) #19
pdr.
LGTM % perf issue. I'm okay with either direction on the assert (my suggestion, or ...
5 years, 3 months ago (2015-08-25 22:14:20 UTC) #20
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/1313733006/diff/40001/Source/modules/fetch/FetchManager.cpp File Source/modules/fetch/FetchManager.cpp (right): https://codereview.chromium.org/1313733006/diff/40001/Source/modules/fetch/FetchManager.cpp#newcode444 Source/modules/fetch/FetchManager.cpp:444: if (SchemeRegistry::shouldTreatURLSchemeAsSupportingFetchAPI(m_request->url().protocol())) { On 2015/08/25 22:04:45, kalman wrote: ...
5 years, 3 months ago (2015-08-26 07:24:48 UTC) #21
tyoshino (SeeGerritForStatus)
Let's make sure to add tests later to cover https://code.google.com/p/chromium/issues/detail?id=466876#c20.
5 years, 3 months ago (2015-08-26 07:33:23 UTC) #22
falken
recusing myself as it's the domain of fetch api now
5 years, 3 months ago (2015-08-26 08:28:59 UTC) #23
not at google - send to devlin
On 2015/08/26 07:33:23, tyoshino wrote: > Let's make sure to add tests later to cover ...
5 years, 3 months ago (2015-08-26 16:26:08 UTC) #24
not at google - send to devlin
dcheng: ping https://codereview.chromium.org/1313733006/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp File Source/platform/weborigin/SchemeRegistry.cpp (right): https://codereview.chromium.org/1313733006/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp#newcode377 Source/platform/weborigin/SchemeRegistry.cpp:377: if (scheme.isEmpty()) On 2015/08/26 07:24:48, tyoshino wrote: ...
5 years, 3 months ago (2015-08-26 16:30:32 UTC) #25
hiroshige
Thanks for implementing this feature! 1. Name of shouldTreatURLSchemeAsSupportingFetchAPI(): > schemes as supporting the fetch ...
5 years, 3 months ago (2015-08-27 09:39:51 UTC) #26
not at google - send to devlin
On 2015/08/27 09:39:51, hiroshige (slow) wrote: > Thanks for implementing this feature! > > 1. ...
5 years, 3 months ago (2015-08-27 15:12:49 UTC) #27
not at google - send to devlin
PTAL, this is blocking me and review latency is quite high. Suggest another reviewer if ...
5 years, 3 months ago (2015-08-28 16:44:32 UTC) #28
yhirano
lgtm
5 years, 3 months ago (2015-08-31 05:07:44 UTC) #29
hiroshige
lgtm. > So you want me to specifically filter out those protocols? In SchemeRegistry or ...
5 years, 3 months ago (2015-08-31 08:34:43 UTC) #30
hiroshige
https://codereview.chromium.org/1313733006/diff/120001/public/web/WebSecurityPolicy.h File public/web/WebSecurityPolicy.h (right): https://codereview.chromium.org/1313733006/diff/120001/public/web/WebSecurityPolicy.h#newcode79 public/web/WebSecurityPolicy.h:79: // Registers a URL scheme that supports the Fetch ...
5 years, 3 months ago (2015-08-31 08:37:07 UTC) #31
dcheng
lgtm
5 years, 3 months ago (2015-08-31 16:38:25 UTC) #32
not at google - send to devlin
https://codereview.chromium.org/1313733006/diff/120001/public/web/WebSecurityPolicy.h File public/web/WebSecurityPolicy.h (right): https://codereview.chromium.org/1313733006/diff/120001/public/web/WebSecurityPolicy.h#newcode79 public/web/WebSecurityPolicy.h:79: // Registers a URL scheme that supports the Fetch ...
5 years, 3 months ago (2015-08-31 17:44:11 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313733006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313733006/140001
5 years, 3 months ago (2015-08-31 17:44:37 UTC) #36
commit-bot: I haz the power
5 years, 3 months ago (2015-08-31 18:54:25 UTC) #37
Message was sent while issue was closed.
Committed patchset #7 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201492

Powered by Google App Engine
This is Rietveld 408576698