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

Issue 1656933003: Add origins argument to registerForeignFetchScopes. (Closed)

Created:
4 years, 10 months ago by Marijn Kruisselbrink
Modified:
4 years, 10 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, falken, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, kinuko+watch, kinuko+serviceworker, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add origins argument to registerForeignFetchScopes. Adds the new argument, stores the list of origins for which to intercept requests, and adds origin checks to the interception code. Also updated the various unit and layout tests. This implements (parts of) the changes to the spec made in https://github.com/mkruisselbrink/ServiceWorker/commit/88bbe9324fa8ac38d8af3e347564450d598757aa BUG=540509 Committed: https://crrev.com/0126c13fddde0066adf3ae782d135968b5ad8b6f Cr-Commit-Position: refs/heads/master@{#376036}

Patch Set 1 #

Total comments: 17

Patch Set 2 : address comments #

Total comments: 3

Patch Set 3 : use url::Origin #

Patch Set 4 : Fix windows build #

Patch Set 5 : add url::Origin::operator== to make tests simpler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -53 lines) Patch
M content/browser/service_worker/foreign_fetch_request_handler.cc View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_database.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 3 chunks +12 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.proto View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 1 2 3 4 4 chunks +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 1 2 3 4 3 chunks +8 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 4 4 chunks +12 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 2 chunks +14 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 4 1 chunk +40 lines, -14 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/foreign-fetch-basics.html View 1 2 chunks +52 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-worker.js View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/register-foreign-fetch-errors-worker.js View 3 chunks +66 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/InstallEvent.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/InstallEvent.cpp View 1 2 3 chunks +35 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/InstallEvent.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M url/origin.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (18 generated)
Marijn Kruisselbrink
4 years, 10 months ago (2016-02-03 00:51:20 UTC) #7
falken
lgtm https://codereview.chromium.org/1656933003/diff/60001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1656933003/diff/60001/content/browser/service_worker/service_worker_version.cc#newcode1338 content/browser/service_worker/service_worker_version.cc:1338: set_foreign_fetch_scopes(sub_scopes); The previous code appended the scopes to ...
4 years, 10 months ago (2016-02-03 02:17:32 UTC) #8
Marijn Kruisselbrink
+tsepez for IPC OWNERS https://codereview.chromium.org/1656933003/diff/60001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1656933003/diff/60001/content/browser/service_worker/service_worker_version.cc#newcode1338 content/browser/service_worker/service_worker_version.cc:1338: set_foreign_fetch_scopes(sub_scopes); On 2016/02/03 at 02:17:31, ...
4 years, 10 months ago (2016-02-03 17:53:31 UTC) #10
Tom Sepez
Messages LGTM
4 years, 10 months ago (2016-02-03 18:04:09 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1656933003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1656933003/80001
4 years, 10 months ago (2016-02-03 18:11:10 UTC) #14
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/142235)
4 years, 10 months ago (2016-02-03 18:25:52 UTC) #16
Marijn Kruisselbrink
+japhet for third_party/WebKit/Source/web OWNERS
4 years, 10 months ago (2016-02-03 18:27:10 UTC) #18
michaeln
https://codereview.chromium.org/1656933003/diff/80001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/1656933003/diff/80001/content/browser/service_worker/service_worker_version.h#newcode152 content/browser/service_worker/service_worker_version.h:152: const std::vector<GURL>& foreign_fetch_origins() const { drive by: would it ...
4 years, 10 months ago (2016-02-03 21:27:21 UTC) #20
Marijn Kruisselbrink
https://codereview.chromium.org/1656933003/diff/80001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/1656933003/diff/80001/content/browser/service_worker/service_worker_version.h#newcode152 content/browser/service_worker/service_worker_version.h:152: const std::vector<GURL>& foreign_fetch_origins() const { On 2016/02/03 at 21:27:21, ...
4 years, 10 months ago (2016-02-04 19:30:07 UTC) #21
Marijn Kruisselbrink
https://codereview.chromium.org/1656933003/diff/80001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/1656933003/diff/80001/content/browser/service_worker/service_worker_version.h#newcode152 content/browser/service_worker/service_worker_version.h:152: const std::vector<GURL>& foreign_fetch_origins() const { On 2016/02/04 at 19:30:07, ...
4 years, 10 months ago (2016-02-04 20:00:45 UTC) #22
Marijn Kruisselbrink
Okay, changed my code to use url::Origin and blink::(Web)SecurityOrigin. +mkwst as a different Source/web OWNER, ...
4 years, 10 months ago (2016-02-04 22:40:15 UTC) #24
michaeln
i didn't mean to add myself as a reviewer, just noticed the newer'ish Origin class ...
4 years, 10 months ago (2016-02-05 20:23:38 UTC) #25
Mike West
On 2016/02/04 at 22:40:15, mek wrote: > Okay, changed my code to use url::Origin and ...
4 years, 10 months ago (2016-02-12 09:25:19 UTC) #26
Marijn Kruisselbrink
+brettw for url/origin.h OWNERS
4 years, 10 months ago (2016-02-13 02:49:25 UTC) #29
Marijn Kruisselbrink
On 2016/02/13 at 02:49:25, Marijn Kruisselbrink wrote: > +brettw for url/origin.h OWNERS brettw: ping?
4 years, 10 months ago (2016-02-17 17:27:14 UTC) #30
brettw
origin.h lgtm
4 years, 10 months ago (2016-02-17 20:38:39 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1656933003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1656933003/160001
4 years, 10 months ago (2016-02-17 20:48:27 UTC) #34
commit-bot: I haz the power
Committed patchset #5 (id:160001)
4 years, 10 months ago (2016-02-17 23:51:06 UTC) #35
commit-bot: I haz the power
4 years, 10 months ago (2016-02-17 23:53:03 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/0126c13fddde0066adf3ae782d135968b5ad8b6f
Cr-Commit-Position: refs/heads/master@{#376036}

Powered by Google App Engine
This is Rietveld 408576698