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

Issue 1191293002: Don't create ServiceWorkerProviderHost for sandboxed frames without allow-same-origin flag. (Closed)

Created:
5 years, 6 months ago by horo
Modified:
5 years, 6 months ago
Reviewers:
kinuko
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't create ServiceWorkerProviderHost for sandboxed frames without allow-same-origin flag. If the frame is a sandboxed iframe without "allow-same-origin" flag, the request from the frame should not be handled by the ServiceWorker. And the frame should not be controlled by any ServiceWorker even if the url of the frame is in a ServiceWorker's scope and "clients.claim()" is called inside the ServiceWorker. To do so, this cl introduces a new ServiceWorkerProviderType for sandboxed iframes named SERVICE_WORKER_PROVIDER_FOR_SANDBOXED_FRAME. If the frame is sandboxed: - Create ServiceWorkerNetworkProvider with SERVICE_WORKER_PROVIDER_FOR_SANDBOXED_FRAME type. - Don't create ServiceWorkerProviderContext. - Don't send ServiceWorkerHostMsg_ProviderCreated message to the browser process. - Don't create ServiceWorkerProviderHost in the browser process. This CL depends on the blink side patches. https://codereview.chromium.org/1197383002/ https://codereview.chromium.org/1199183002/ BUG=486308 TEST=layout test which will be added in https://codereview.chromium.org/1208693003 Committed: https://crrev.com/ec2c1c8707b7d2fe6b236a745b76c19a404b1ec6 Cr-Commit-Position: refs/heads/master@{#336089}

Patch Set 1 : #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : incorporated kinuko's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -9 lines) Patch
M content/browser/service_worker/service_worker_provider_host.cc View 1 3 chunks +5 lines, -1 line 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 1 2 4 chunks +16 lines, -2 lines 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/service_worker/service_worker_types.h View 1 chunk +5 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 4 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
horo
kinuko@ Could you please review this?
5 years, 6 months ago (2015-06-23 10:33:44 UTC) #5
kinuko
https://codereview.chromium.org/1191293002/diff/80001/content/child/service_worker/service_worker_network_provider.cc File content/child/service_worker/service_worker_network_provider.cc (right): https://codereview.chromium.org/1191293002/diff/80001/content/child/service_worker/service_worker_network_provider.cc#newcode43 content/child/service_worker/service_worker_network_provider.cc:43: : GetNextProviderId()) { nit: could this part be factored ...
5 years, 6 months ago (2015-06-23 10:55:56 UTC) #6
horo
https://codereview.chromium.org/1191293002/diff/80001/content/child/service_worker/service_worker_network_provider.cc File content/child/service_worker/service_worker_network_provider.cc (right): https://codereview.chromium.org/1191293002/diff/80001/content/child/service_worker/service_worker_network_provider.cc#newcode43 content/child/service_worker/service_worker_network_provider.cc:43: : GetNextProviderId()) { On 2015/06/23 10:55:56, kinuko wrote: > ...
5 years, 6 months ago (2015-06-23 13:55:14 UTC) #8
kinuko
lgtm
5 years, 6 months ago (2015-06-23 14:18:55 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1191293002/120001
5 years, 6 months ago (2015-06-24 22:52:22 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1191293002/120001
5 years, 6 months ago (2015-06-25 03:45:11 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1191293002/120001
5 years, 6 months ago (2015-06-25 04:01:00 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:120001)
5 years, 6 months ago (2015-06-25 04:12:06 UTC) #18
commit-bot: I haz the power
5 years, 6 months ago (2015-06-25 04:12:59 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ec2c1c8707b7d2fe6b236a745b76c19a404b1ec6
Cr-Commit-Position: refs/heads/master@{#336089}

Powered by Google App Engine
This is Rietveld 408576698