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 1270513002: Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Chromium 2/3) (Closed)

Created:
5 years, 4 months ago by jungkees
Modified:
5 years, 4 months ago
CC:
chromium-reviews, horo, jam, kinuko+serviceworker, kinuko+watch, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Chromium 2/3) As per the resolution of f2f, ServiceWorkerRegistration.update() should return a promise that transforms the promise returned by Update algorithm. In this CL, ServiceWorkerContextCore::UpdateServiceWorker method has been overloaded to cover two invocation paths: a scheduled update without a provider_host and a callback (Soft Update in the spec) and a call initiated from the script surface using ServiceWorkerRegistration.update(). Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-update Spec discussion: https://github.com/slightlyoff/ServiceWorker/issues/311 Companion CL (Blink): https://codereview.chromium.org/1260833003/ Companion CL (Blink layout test): https://codereview.chromium.org/1268663003/ BUG=513655 Committed: https://crrev.com/2f85d42e860bb2370f411a7a2d3ad665641d6970 Cr-Commit-Position: refs/heads/master@{#341515}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix strings. #

Total comments: 6

Patch Set 3 : Pass a raw ptr to callback's onError instead of a scoped_ptr. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -25 lines) Patch
M content/browser/service_worker/service_worker_context_core.h View 3 chunks +12 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 3 chunks +42 lines, -9 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 2 chunks +11 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 5 chunks +70 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.h View 6 chunks +13 lines, -1 line 0 comments Download
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 5 chunks +48 lines, -3 lines 0 comments Download
M content/child/service_worker/web_service_worker_registration_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/child/service_worker/web_service_worker_registration_impl.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 3 chunks +16 lines, -1 line 0 comments Download
M content/common/service_worker/service_worker_types.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/service_worker/service_worker_types.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (16 generated)
jungkees
Chromium side of the registration.update() change. PTAL.
5 years, 4 months ago (2015-07-30 11:34:58 UTC) #2
zino
https://codereview.chromium.org/1270513002/diff/1/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1270513002/diff/1/content/child/service_worker/service_worker_dispatcher.cc#newcode395 content/child/service_worker/service_worker_dispatcher.cc:395: "ServiceWorkerDispatcher::RegisterServiceWorker", I'm not sure but shouldn't this be "Update" ...
5 years, 4 months ago (2015-07-31 01:00:47 UTC) #3
jungkees
Addressed the comment. Thanks for peer-review. https://codereview.chromium.org/1270513002/diff/1/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1270513002/diff/1/content/child/service_worker/service_worker_dispatcher.cc#newcode395 content/child/service_worker/service_worker_dispatcher.cc:395: "ServiceWorkerDispatcher::RegisterServiceWorker", Right. Thanks ...
5 years, 4 months ago (2015-07-31 05:49:18 UTC) #4
jungkees
SW OWNERs, PTAL.
5 years, 4 months ago (2015-07-31 05:51:38 UTC) #6
nhiroki
Looks good overall. Nit comments only. https://codereview.chromium.org/1270513002/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/1270513002/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode437 content/browser/service_worker/service_worker_dispatcher_host.cc:437: base::ASCIIToUTF16(kInvalidStateErrorMessage))); We might ...
5 years, 4 months ago (2015-07-31 06:49:11 UTC) #7
jungkees
Uploaded a new snapshot having addressed the comments. PTAL. https://codereview.chromium.org/1270513002/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/1270513002/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode437 content/browser/service_worker/service_worker_dispatcher_host.cc:437: ...
5 years, 4 months ago (2015-07-31 07:09:58 UTC) #8
nhiroki
LGTM
5 years, 4 months ago (2015-07-31 07:46: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/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-07-31 10:17:39 UTC) #11
jungkees
+mkwst@ PTAL at 'content/common/service_worker/service_worker_messages.h'. This CL is changing ServiceWorkerContainer.update() method as reviewed by Service Worker ...
5 years, 4 months ago (2015-07-31 10:30:35 UTC) #14
Mike West
IPC changes LGTM.
5 years, 4 months ago (2015-07-31 13:06:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-08-03 05:54:33 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/116583)
5 years, 4 months ago (2015-08-03 06:04:26 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-08-03 06:44:31 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/116587)
5 years, 4 months ago (2015-08-03 06:54:23 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-08-03 07:29:26 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/98455)
5 years, 4 months ago (2015-08-03 07:41:19 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-08-03 07:54:09 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/116607)
5 years, 4 months ago (2015-08-03 08:04:28 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-08-03 09:41:11 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/87547)
5 years, 4 months ago (2015-08-03 11:01:11 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270513002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270513002/40001
5 years, 4 months ago (2015-08-03 11:19:57 UTC) #37
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 4 months ago (2015-08-03 12:10:54 UTC) #38
commit-bot: I haz the power
5 years, 4 months ago (2015-08-03 12:11:28 UTC) #39
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/2f85d42e860bb2370f411a7a2d3ad665641d6970
Cr-Commit-Position: refs/heads/master@{#341515}

Powered by Google App Engine
This is Rietveld 408576698