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

Issue 1259213002: Move Service Worker %2f path validation logic from browser into Blink (1) (Closed)

Created:
5 years, 4 months ago by jeremyarcher
Modified:
5 years, 4 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+serviceworker, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move Service Worker %2f path validation logic from browser into Blink (1) This patch adds an interface by which the path validation logic can be kept in Chromium but called from within Blink. It will be eventually used to ensure that navigator.serviceWorker.register() rejects with a TypeError instead of a DOMException (see spec). 1. (Chromium) This CL. 2. (Blink) https://codereview.chromium.org/1260003003/ 3. (Chromium) https://codereview.chromium.org/1256833004/ BUG=513622 R=nhiroki,falken Committed: https://crrev.com/86e6e3346b35b06badaaa0c7e4edc14151bf5c10 Cr-Commit-Position: refs/heads/master@{#342279}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move ServiceWorkerUtils from browser into common #

Total comments: 1

Patch Set 3 : Add error_message field to validateScopeAndScriptURL. #

Total comments: 1

Patch Set 4 : Ensure that upstream CL tests pass. #

Total comments: 1

Patch Set 5 : Reformat and remove prefix. #

Total comments: 3

Patch Set 6 : Fix remaining nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -776 lines) Patch
M content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_request_handler_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_request_handler_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_unregister_job.cc View 1 1 chunk +1 line, -1 line 0 comments Download
D content/browser/service_worker/service_worker_utils.h View 1 1 chunk +0 lines, -60 lines 0 comments Download
D content/browser/service_worker/service_worker_utils.cc View 1 1 chunk +0 lines, -117 lines 0 comments Download
D content/browser/service_worker/service_worker_utils_unittest.cc View 1 1 chunk +0 lines, -414 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.cc View 1 2 3 4 5 2 chunks +13 lines, -0 lines 0 comments Download
A + content/common/service_worker/service_worker_utils.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
A + content/common/service_worker/service_worker_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
A + content/common/service_worker/service_worker_utils_unittest.cc View 1 8 chunks +141 lines, -160 lines 0 comments Download
M content/content_browser.gypi View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_common.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (10 generated)
jeremyarcher
5 years, 4 months ago (2015-07-28 09:01:56 UTC) #1
nhiroki
https://codereview.chromium.org/1259213002/diff/1/content/child/service_worker/web_service_worker_provider_impl.cc File content/child/service_worker/web_service_worker_provider_impl.cc (right): https://codereview.chromium.org/1259213002/diff/1/content/child/service_worker/web_service_worker_provider_impl.cc#newcode83 content/child/service_worker/web_service_worker_provider_impl.cc:83: return !ServiceWorkerUtils::ContainsDisallowedCharacter( This is a module dependency violation. We ...
5 years, 4 months ago (2015-07-28 09:16:03 UTC) #2
jeremyarcher
On 2015/07/28 09:16:03, nhiroki wrote: > https://codereview.chromium.org/1259213002/diff/1/content/child/service_worker/web_service_worker_provider_impl.cc > File content/child/service_worker/web_service_worker_provider_impl.cc (right): > > https://codereview.chromium.org/1259213002/diff/1/content/child/service_worker/web_service_worker_provider_impl.cc#newcode83 > ...
5 years, 4 months ago (2015-07-29 02:29:48 UTC) #3
nhiroki
https://codereview.chromium.org/1259213002/diff/20001/content/child/service_worker/web_service_worker_provider_impl.cc File content/child/service_worker/web_service_worker_provider_impl.cc (right): https://codereview.chromium.org/1259213002/diff/20001/content/child/service_worker/web_service_worker_provider_impl.cc#newcode84 content/child/service_worker/web_service_worker_provider_impl.cc:84: nullptr); How about returning an error message provided by ...
5 years, 4 months ago (2015-07-29 09:09:37 UTC) #4
jeremyarcher
On 2015/07/29 09:09:37, nhiroki wrote: > https://codereview.chromium.org/1259213002/diff/20001/content/child/service_worker/web_service_worker_provider_impl.cc > File content/child/service_worker/web_service_worker_provider_impl.cc (right): > > https://codereview.chromium.org/1259213002/diff/20001/content/child/service_worker/web_service_worker_provider_impl.cc#newcode84 > ...
5 years, 4 months ago (2015-07-31 05:50:38 UTC) #5
nhiroki
lgtm with a nit https://codereview.chromium.org/1259213002/diff/40001/content/child/service_worker/web_service_worker_provider_impl.cc File content/child/service_worker/web_service_worker_provider_impl.cc (right): https://codereview.chromium.org/1259213002/diff/40001/content/child/service_worker/web_service_worker_provider_impl.cc#newcode84 content/child/service_worker/web_service_worker_provider_impl.cc:84: std::string error = ""; nit: ...
5 years, 4 months ago (2015-07-31 06:07:05 UTC) #6
jeremyarcher
On 2015/07/31 06:07:05, nhiroki wrote: > lgtm with a nit > > https://codereview.chromium.org/1259213002/diff/40001/content/child/service_worker/web_service_worker_provider_impl.cc > File ...
5 years, 4 months ago (2015-07-31 08:10:30 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259213002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259213002/60001
5 years, 4 months ago (2015-08-03 03:42:49 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/84184)
5 years, 4 months ago (2015-08-03 03:52:36 UTC) #13
falken
https://codereview.chromium.org/1259213002/diff/60001/content/child/service_worker/web_service_worker_provider_impl.cc File content/child/service_worker/web_service_worker_provider_impl.cc (right): https://codereview.chromium.org/1259213002/diff/60001/content/child/service_worker/web_service_worker_provider_impl.cc#newcode89 content/child/service_worker/web_service_worker_provider_impl.cc:89: blink::WebString::fromUTF8(kServiceWorkerRegisterErrorPrefix + error); There's some discussion on the Blink ...
5 years, 4 months ago (2015-08-03 03:56:32 UTC) #15
jeremyarcher
On 2015/08/03 03:56:32, falken wrote: > https://codereview.chromium.org/1259213002/diff/60001/content/child/service_worker/web_service_worker_provider_impl.cc > File content/child/service_worker/web_service_worker_provider_impl.cc (right): > > https://codereview.chromium.org/1259213002/diff/60001/content/child/service_worker/web_service_worker_provider_impl.cc#newcode89 > ...
5 years, 4 months ago (2015-08-03 06:08:08 UTC) #16
nhiroki
still lgtm https://codereview.chromium.org/1259213002/diff/100001/content/child/service_worker/web_service_worker_provider_impl.cc File content/child/service_worker/web_service_worker_provider_impl.cc (right): https://codereview.chromium.org/1259213002/diff/100001/content/child/service_worker/web_service_worker_provider_impl.cc#newcode89 content/child/service_worker/web_service_worker_provider_impl.cc:89: } nit: This is no longer a ...
5 years, 4 months ago (2015-08-05 06:25:49 UTC) #17
falken
lgtm 2 https://codereview.chromium.org/1259213002/diff/100001/content/common/service_worker/service_worker_utils.h File content/common/service_worker/service_worker_utils.h (right): https://codereview.chromium.org/1259213002/diff/100001/content/common/service_worker/service_worker_utils.h#newcode5 content/common/service_worker/service_worker_utils.h:5: #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_ This include guard should be ...
5 years, 4 months ago (2015-08-05 06:46:38 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259213002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259213002/120001
5 years, 4 months ago (2015-08-05 07:06:21 UTC) #21
nhiroki
FYI: you need an owner review for content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc
5 years, 4 months ago (2015-08-05 07:11:05 UTC) #22
jeremyarcher
+mek@chromium.org
5 years, 4 months ago (2015-08-06 01:54:55 UTC) #25
Marijn Kruisselbrink
On 2015/08/06 at 01:54:55, jeremyarcher wrote: > +mek@chromium.org lgtm
5 years, 4 months ago (2015-08-06 16:16:53 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259213002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259213002/120001
5 years, 4 months ago (2015-08-07 01:06:14 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 4 months ago (2015-08-07 03:05:29 UTC) #29
commit-bot: I haz the power
5 years, 4 months ago (2015-08-07 03:06:29 UTC) #30
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/86e6e3346b35b06badaaa0c7e4edc14151bf5c10
Cr-Commit-Position: refs/heads/master@{#342279}

Powered by Google App Engine
This is Rietveld 408576698