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

Issue 1191793003: [Service Worker Registration] removed protocolIsInHTTPFamily and replaced with SchemeRegistry check (Closed)

Created:
5 years, 6 months ago by annekao
Modified:
5 years, 5 months ago
CC:
blink-reviews, horo+watch_chromium.org, jsbell+serviceworker_chromium.org, kalman_google, kinuko+serviceworker, michaeln, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Service Workers require a secure origin, such as HTTPS. chrome-extension:// pages are not HTTP/HTTPS, but are secure so this change becomes a necessary step to allow extensions to register a Service Worker. SchemeRegistry files were changed to add registerURLSchemeAsAllowingServiceWorkers and shouldTreatURLSchemeAsAllowingServiceWorkers allowing chrome-extension schemes to register Service Workers. The registerURLSchemeAs... will take place in chrome_content_renderer_client.cc WebSecurityPolicy files were changed to follow the pattern of the other registerURLSchemeAs functions in SchemeRegistry. The ServiceWorkerContainer no longer uses protocolIsIntHTTPFamily and instead uses the new shouldTreatURLSchemeAs... function which for now checks schemes against HTTP, HTTPS, and chrome-extension. BUG=501569 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198079

Patch Set 1 #

Patch Set 2 : added shouldAllowServiceWorkers in SchemeRegistry. Used instead of isSecure in ServiceWorkerContai… #

Total comments: 1

Patch Set 3 : Edited SchemeRegistry and WebSecurityPolicy #

Total comments: 2

Patch Set 4 : Changed function names from Allow to Allowing #

Total comments: 6

Patch Set 5 : Added comments for scheme checks #

Total comments: 2

Patch Set 6 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -5 lines) Patch
M Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 1 2 3 4 5 6 chunks +7 lines, -5 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 3 4 2 chunks +30 lines, -0 lines 0 comments Download
M Source/web/WebSecurityPolicy.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M public/web/WebSecurityPolicy.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (17 generated)
annekao
5 years, 6 months ago (2015-06-17 21:59:49 UTC) #2
Devlin
We typically have a BUG=99999 line in the CL description, which allows us to track ...
5 years, 6 months ago (2015-06-17 22:32:41 UTC) #3
annekao
On 2015/06/17 22:32:41, Devlin wrote: > We typically have a BUG=99999 line in the CL ...
5 years, 6 months ago (2015-06-18 01:17:34 UTC) #4
Devlin
On 2015/06/18 01:17:34, annekao wrote: > On 2015/06/17 22:32:41, Devlin wrote: > > We typically ...
5 years, 6 months ago (2015-06-18 15:27:55 UTC) #5
Devlin
Don't forget to ping when you update a CL - otherwise we never know. :) ...
5 years, 6 months ago (2015-06-19 00:00:10 UTC) #6
annekao
On 2015/06/19 00:00:10, Devlin wrote: > Don't forget to ping when you update a CL ...
5 years, 6 months ago (2015-06-19 19:19:10 UTC) #8
jsbell
Deferring to falken@ who may have insights on this, since I haven't been tracking the ...
5 years, 6 months ago (2015-06-19 21:48:35 UTC) #10
Devlin
On 2015/06/19 21:48:35, jsbell wrote: > Deferring to falken@ who may have insights on this, ...
5 years, 6 months ago (2015-06-19 21:56:57 UTC) #11
falken
On 2015/06/19 21:56:57, Devlin wrote: > On 2015/06/19 21:48:35, jsbell wrote: > > Deferring to ...
5 years, 6 months ago (2015-06-22 06:12:46 UTC) #12
Devlin
On 2015/06/22 06:12:46, falken wrote: > I'd be more comfortable with a check like isHTTPProtocol ...
5 years, 6 months ago (2015-06-22 15:22:48 UTC) #13
not at google - send to devlin
Drive-by: I sympathise with falken's concern that this is treading in new territory and who-really-knows-what-will-happen. ...
5 years, 6 months ago (2015-06-22 18:11:48 UTC) #14
falken
On 2015/06/22 15:22:48, Devlin wrote: > On 2015/06/22 06:12:46, falken wrote: > > I'd be ...
5 years, 6 months ago (2015-06-23 03:28:31 UTC) #15
annekao
Added "shouldAllowServiceWorkers" to SchemeRegistry and used that instead of "isSecure" in ServiceWorkerContainer.cpp to avoid any ...
5 years, 6 months ago (2015-06-23 17:47:04 UTC) #18
Devlin
https://codereview.chromium.org/1191793003/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp File Source/platform/weborigin/SchemeRegistry.cpp (right): https://codereview.chromium.org/1191793003/diff/40001/Source/platform/weborigin/SchemeRegistry.cpp#newcode171 Source/platform/weborigin/SchemeRegistry.cpp:171: serviceWorkerSchemes.add("chrome-extension"); This shouldn't be added here (it's a layering ...
5 years, 6 months ago (2015-06-23 17:52:32 UTC) #19
annekao
Fixed the SchemeRegistry for ServiceWorkers. Took out the serviceWorkerSchemes.add("chrome-extension") line from Patch#2 and added a ...
5 years, 6 months ago (2015-06-23 20:37:51 UTC) #22
Devlin
Cool! Just a couple nits, but otherwise lgtm. https://codereview.chromium.org/1191793003/diff/80001/Source/platform/weborigin/SchemeRegistry.h File Source/platform/weborigin/SchemeRegistry.h (right): https://codereview.chromium.org/1191793003/diff/80001/Source/platform/weborigin/SchemeRegistry.h#newcode90 Source/platform/weborigin/SchemeRegistry.h:90: // ...
5 years, 6 months ago (2015-06-23 20:53:47 UTC) #23
brettw
I lack context on this. What feedback are you hoping to get from me?
5 years, 6 months ago (2015-06-23 21:26:26 UTC) #24
falken
Sorry to go back and forth on this, I don't intend to block this CL, ...
5 years, 6 months ago (2015-06-24 04:38:30 UTC) #25
falken
Sorry to go back and forth on this, I don't intend to block this CL, ...
5 years, 6 months ago (2015-06-24 04:38:31 UTC) #26
Devlin
On 2015/06/24 04:38:31, falken wrote: > We'll have to repeat this exercise in content/. Is ...
5 years, 6 months ago (2015-06-24 15:46:31 UTC) #27
falken
ok LGTM
5 years, 6 months ago (2015-06-24 15:49:12 UTC) #28
annekao
Just updated the patch with some changes to the function names. Thanks Devlin and falkin ...
5 years, 6 months ago (2015-06-24 17:34:45 UTC) #30
brettw
I don't actually know anything about the service worker security model. It doesn't seem obviously ...
5 years, 6 months ago (2015-06-24 17:47:31 UTC) #31
not at google - send to devlin
On 2015/06/24 17:47:31, brettw wrote: > I don't actually know anything about the service worker ...
5 years, 6 months ago (2015-06-24 17:53:15 UTC) #32
annekao
Hi dcheng@, please take a look at the changes in the WebSecurityPolicy files. I've added ...
5 years, 6 months ago (2015-06-24 19:48:41 UTC) #34
dcheng
https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp File Source/platform/weborigin/SchemeRegistry.cpp (right): https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp#newcode169 Source/platform/weborigin/SchemeRegistry.cpp:169: serviceWorkerSchemes.add("http"); Why is http in this list?
5 years, 6 months ago (2015-06-24 20:20:15 UTC) #35
palmer
As the commit message says, SWs require secure origins. HTTP is not. :) https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp File ...
5 years, 6 months ago (2015-06-24 20:26:03 UTC) #37
annekao
On 2015/06/24 20:20:15, dcheng wrote: > https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp > File Source/platform/weborigin/SchemeRegistry.cpp (right): > > https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp#newcode169 > ...
5 years, 6 months ago (2015-06-24 20:30:36 UTC) #38
Devlin
On 2015/06/24 20:30:36, annekao wrote: > On 2015/06/24 20:20:15, dcheng wrote: > > > https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp ...
5 years, 6 months ago (2015-06-24 20:38:44 UTC) #39
kinuko
Um, I feel I come a bit late. I'm not fully sure the current design ...
5 years, 6 months ago (2015-06-25 05:26:36 UTC) #42
falken
On 2015/06/24 20:38:44, Devlin wrote: > On 2015/06/24 20:30:36, annekao wrote: > > On 2015/06/24 ...
5 years, 6 months ago (2015-06-25 05:45:01 UTC) #43
Devlin
https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.h File Source/platform/weborigin/SchemeRegistry.h (right): https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.h#newcode92 Source/platform/weborigin/SchemeRegistry.h:92: static bool shouldTreatURLSchemeAsAllowingServiceWorkers(const String& scheme); On 2015/06/25 05:26:36, kinuko ...
5 years, 5 months ago (2015-06-25 15:26:16 UTC) #44
Devlin
All, I think we need to be careful, because we might be at the point ...
5 years, 5 months ago (2015-06-25 15:46:49 UTC) #45
not at google - send to devlin
On 2015/06/23 21:26:26, brettw wrote: > I lack context on this. What feedback are you ...
5 years, 5 months ago (2015-06-25 15:47:56 UTC) #46
Mike West
https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.h File Source/platform/weborigin/SchemeRegistry.h (right): https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.h#newcode92 Source/platform/weborigin/SchemeRegistry.h:92: static bool shouldTreatURLSchemeAsAllowingServiceWorkers(const String& scheme); On 2015/06/25 at 15:26:15, ...
5 years, 5 months ago (2015-06-25 15:49:37 UTC) #47
Devlin
Talked with Mike a bit offline, and got a few suggestions: - Use isSecure() + ...
5 years, 5 months ago (2015-06-25 16:19:32 UTC) #48
brettw
On Thu, Jun 25, 2015 at 8:47 AM, <kalman@chromium.org> wrote: > On 2015/06/23 21:26:26, brettw ...
5 years, 5 months ago (2015-06-25 19:28:10 UTC) #49
michaeln
https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp File Source/platform/weborigin/SchemeRegistry.cpp (right): https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp#newcode169 Source/platform/weborigin/SchemeRegistry.cpp:169: serviceWorkerSchemes.add("http"); On 2015/06/24 20:26:02, palmer wrote: > > Why ...
5 years, 5 months ago (2015-06-25 23:03:19 UTC) #52
dcheng
On 2015/06/25 at 23:03:19, michaeln wrote: > https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp > File Source/platform/weborigin/SchemeRegistry.cpp (right): > > https://codereview.chromium.org/1191793003/diff/100001/Source/platform/weborigin/SchemeRegistry.cpp#newcode169 ...
5 years, 5 months ago (2015-06-25 23:10:26 UTC) #53
Devlin
On 2015/06/25 23:10:26, dcheng wrote: > On 2015/06/25 at 23:03:19, michaeln wrote: > > > ...
5 years, 5 months ago (2015-06-25 23:27:56 UTC) #54
falken
On 2015/06/25 23:27:56, Devlin wrote: > On 2015/06/25 23:10:26, dcheng wrote: > > On 2015/06/25 ...
5 years, 5 months ago (2015-06-26 01:27:05 UTC) #55
dcheng
On 2015/06/26 at 01:27:05, falken wrote: > On 2015/06/25 23:27:56, Devlin wrote: > > On ...
5 years, 5 months ago (2015-06-26 06:51:35 UTC) #56
Mike West
Assuming that we actually want to expose service workers to extensions, this seems like a ...
5 years, 5 months ago (2015-06-29 08:01:32 UTC) #57
annekao
On 2015/06/29 08:01:32, Mike West wrote: > Assuming that we actually want to expose service ...
5 years, 5 months ago (2015-06-29 17:07:15 UTC) #58
dcheng
On 2015/06/29 at 17:07:15, annekao wrote: > On 2015/06/29 08:01:32, Mike West wrote: > > ...
5 years, 5 months ago (2015-06-29 17:11:54 UTC) #59
annekao
On 2015/06/29 17:11:54, dcheng wrote: > On 2015/06/29 at 17:07:15, annekao wrote: > > On ...
5 years, 5 months ago (2015-06-29 19:45:28 UTC) #60
Devlin
https://codereview.chromium.org/1191793003/diff/120001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp File Source/modules/serviceworkers/ServiceWorkerContainer.cpp (right): https://codereview.chromium.org/1191793003/diff/120001/Source/modules/serviceworkers/ServiceWorkerContainer.cpp#newcode217 Source/modules/serviceworkers/ServiceWorkerContainer.cpp:217: if (!executionContext->isPrivilegedContext(errorMessage)) { so let's say (courtesy of falken@) ...
5 years, 5 months ago (2015-06-29 19:54:44 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1191793003/160001
5 years, 5 months ago (2015-06-30 16:34:07 UTC) #65
commit-bot: I haz the power
5 years, 5 months ago (2015-06-30 17:55:59 UTC) #66
Message was sent while issue was closed.
Committed patchset #6 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198079

Powered by Google App Engine
This is Rietveld 408576698