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

Issue 894973003: ServiceWorker: Make "ready" fetches registration from browser process(2/3). (Closed)

Created:
5 years, 10 months ago by xiang
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, michaeln, 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

ServiceWorker: Make "ready" fetches registration from browser process(2/3). ServiceWorkerProviderHost will maintain associated registration and all matching living registrations during its lifetime. Get registration for "ready" property request will be handled by fetching the longest matched one without hitting the DB. The MatchRegistration() method could also be used by "claim" functionality later. Blink CL: https://codereview.chromium.org/894983002/ Cleanup & Test: https://codereview.chromium.org/912443002/ BUG=454726, 454250, 462529 Committed: https://crrev.com/71a34b78703ad8bfefbd8c54ea78414e8cda7eca Cr-Commit-Position: refs/heads/master@{#319815}

Patch Set 1 #

Patch Set 2 : refactor #

Patch Set 3 : cleanup #

Total comments: 6

Patch Set 4 : add unitests, change names #

Total comments: 12

Patch Set 5 : address comment#11 #

Patch Set 6 : add OneShotGetReadyCallback #

Total comments: 2

Patch Set 7 : #13 #

Total comments: 20

Patch Set 8 : #15 #

Patch Set 9 : work around push browser tests; make ready IPC sent later #

Total comments: 2

Patch Set 10 : #30 #

Total comments: 4

Patch Set 11 : #35 #

Patch Set 12 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+372 lines, -163 lines) Patch
M chrome/test/data/push_messaging/push_test.js View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +55 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +39 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +104 lines, -12 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host_unittest.cc View 1 2 3 4 5 6 7 2 chunks +54 lines, -80 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.h View 1 2 3 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 1 2 3 4 5 6 7 9 2 chunks +7 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler_unittest.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +15 lines, -4 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 3 4 5 6 7 5 chunks +39 lines, -36 lines 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.cc View 1 2 3 2 chunks +5 lines, -18 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (25 generated)
xiang
PTAL, thanks!
5 years, 10 months ago (2015-02-09 08:36:12 UTC) #3
dominicc (has gone to gerrit)
Some comments inline. https://codereview.chromium.org/894973003/diff/100001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/894973003/diff/100001/content/browser/service_worker/service_worker_provider_host.h#newcode162 content/browser/service_worker/service_worker_provider_host.h:162: // Calls by dispatcher host to ...
5 years, 10 months ago (2015-02-10 04:10:54 UTC) #6
xiang
Thanks for the review, CL updated. I also cleaned & added new tests for sw ...
5 years, 10 months ago (2015-02-12 07:14:23 UTC) #8
dominicc (has gone to gerrit)
On 2015/02/12 at 07:27:17, xiang.long wrote: > Patchset #4 (id:140001) has been deleted This LGTM, ...
5 years, 10 months ago (2015-02-16 07:07:15 UTC) #10
falken
looking good to me too https://codereview.chromium.org/894973003/diff/160001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/894973003/diff/160001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode513 content/browser/service_worker/service_worker_dispatcher_host.cc:513: provider_host->GetRegistrationForReady( GetRegistrationForReady does a ...
5 years, 10 months ago (2015-02-16 09:18:29 UTC) #11
xiang
Thanks for the review! CL updated. https://codereview.chromium.org/894973003/diff/160001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/894973003/diff/160001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode513 content/browser/service_worker/service_worker_dispatcher_host.cc:513: provider_host->GetRegistrationForReady( On 2015/02/16 ...
5 years, 10 months ago (2015-02-26 06:52:15 UTC) #12
michaeln
drive by: this change looks great https://codereview.chromium.org/894973003/diff/200001/content/browser/service_worker/service_worker_provider_host.cc File content/browser/service_worker/service_worker_provider_host.cc (right): https://codereview.chromium.org/894973003/diff/200001/content/browser/service_worker/service_worker_provider_host.cc#newcode86 content/browser/service_worker/service_worker_provider_host.cc:86: callback.Reset(); not sure ...
5 years, 10 months ago (2015-02-26 21:41:06 UTC) #13
xiang
https://codereview.chromium.org/894973003/diff/200001/content/browser/service_worker/service_worker_provider_host.cc File content/browser/service_worker/service_worker_provider_host.cc (right): https://codereview.chromium.org/894973003/diff/200001/content/browser/service_worker/service_worker_provider_host.cc#newcode86 content/browser/service_worker/service_worker_provider_host.cc:86: callback.Reset(); On 2015/02/26 21:41:06, michaeln wrote: > not sure ...
5 years, 9 months ago (2015-02-27 09:33:46 UTC) #14
falken
lgtm https://codereview.chromium.org/894973003/diff/220001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/894973003/diff/220001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode508 content/browser/service_worker/service_worker_dispatcher_host.cc:508: BadMessageReceived(); It seems possible for IsContextAlive to be ...
5 years, 9 months ago (2015-03-02 02:09:41 UTC) #15
xiang
Thanks for the review. https://codereview.chromium.org/894973003/diff/220001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/894973003/diff/220001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode508 content/browser/service_worker/service_worker_dispatcher_host.cc:508: BadMessageReceived(); On 2015/03/02 02:09:40, falken ...
5 years, 9 months ago (2015-03-03 08:56:04 UTC) #16
xiang
On 2015/03/04 01:49:28, xiang wrote: > mailto:xiang.long@intel.com changed reviewers: > + mailto:mkwst@chromium.org mkwst@ would you ...
5 years, 9 months ago (2015-03-04 01:51:04 UTC) #18
Mike West
IPC LGTM.
5 years, 9 months ago (2015-03-04 08:34:54 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894973003/240001
5 years, 9 months ago (2015-03-04 08:57:45 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/32171)
5 years, 9 months ago (2015-03-04 13:12:52 UTC) #24
xiang
falken@ I made some changes after your l-g-t-m, you may want to take another look. ...
5 years, 9 months ago (2015-03-05 08:51:43 UTC) #25
falken
https://codereview.chromium.org/894973003/diff/260001/chrome/test/data/push_messaging/push_test.js File chrome/test/data/push_messaging/push_test.js (right): https://codereview.chromium.org/894973003/diff/260001/chrome/test/data/push_messaging/push_test.js#newcode95 chrome/test/data/push_messaging/push_test.js:95: // TODO(xiang): Remove this function after "ready" CL landed. ...
5 years, 9 months ago (2015-03-05 09:21:52 UTC) #26
xiang
On 2015/03/05 09:21:52, falken wrote: > https://codereview.chromium.org/894973003/diff/260001/chrome/test/data/push_messaging/push_test.js > File chrome/test/data/push_messaging/push_test.js (right): > > https://codereview.chromium.org/894973003/diff/260001/chrome/test/data/push_messaging/push_test.js#newcode95 > ...
5 years, 9 months ago (2015-03-06 07:18:41 UTC) #27
falken
On 2015/03/06 07:18:41, xiang wrote: > On 2015/03/05 09:21:52, falken wrote: > > > https://codereview.chromium.org/894973003/diff/260001/chrome/test/data/push_messaging/push_test.js ...
5 years, 9 months ago (2015-03-06 08:26:17 UTC) #28
xiang
On 2015/03/06 08:26:17, falken wrote: > On 2015/03/06 07:18:41, xiang wrote: > > On 2015/03/05 ...
5 years, 9 months ago (2015-03-06 08:50:26 UTC) #29
falken
On 2015/03/06 08:50:26, xiang wrote: > On 2015/03/06 08:26:17, falken wrote: > > On 2015/03/06 ...
5 years, 9 months ago (2015-03-06 09:07:49 UTC) #30
xiang
> > Ah, I gotcha now. I think adding a new function like you've done ...
5 years, 9 months ago (2015-03-09 05:16:03 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894973003/280001
5 years, 9 months ago (2015-03-09 05:49:56 UTC) #34
falken
lgtm https://codereview.chromium.org/894973003/diff/280001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/894973003/diff/280001/content/browser/service_worker/service_worker_provider_host.h#newcode220 content/browser/service_worker/service_worker_provider_host.h:220: OneShotGetReadyCallback(const GetRegistrationForReadyCallback& callback); nit: explicit https://codereview.chromium.org/894973003/diff/280001/content/child/service_worker/service_worker_dispatcher.h File content/child/service_worker/service_worker_dispatcher.h ...
5 years, 9 months ago (2015-03-09 06:29:23 UTC) #35
xiang
https://codereview.chromium.org/894973003/diff/280001/content/browser/service_worker/service_worker_provider_host.h File content/browser/service_worker/service_worker_provider_host.h (right): https://codereview.chromium.org/894973003/diff/280001/content/browser/service_worker/service_worker_provider_host.h#newcode220 content/browser/service_worker/service_worker_provider_host.h:220: OneShotGetReadyCallback(const GetRegistrationForReadyCallback& callback); On 2015/03/09 06:29:23, falken wrote: > ...
5 years, 9 months ago (2015-03-09 06:46:13 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894973003/300001
5 years, 9 months ago (2015-03-09 06:46:42 UTC) #40
commit-bot: I haz the power
Failed to apply the patch.
5 years, 9 months ago (2015-03-09 07:50:12 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894973003/300001
5 years, 9 months ago (2015-03-09 08:28:53 UTC) #45
commit-bot: I haz the power
Failed to apply the patch.
5 years, 9 months ago (2015-03-09 08:29:34 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894973003/320001
5 years, 9 months ago (2015-03-09 08:47:34 UTC) #51
commit-bot: I haz the power
Failed to apply the patch.
5 years, 9 months ago (2015-03-09 10:38:44 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894973003/320001
5 years, 9 months ago (2015-03-10 01:50:23 UTC) #56
commit-bot: I haz the power
Committed patchset #12 (id:320001)
5 years, 9 months ago (2015-03-10 01:52:11 UTC) #57
commit-bot: I haz the power
5 years, 9 months ago (2015-03-10 01:53:21 UTC) #58
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/71a34b78703ad8bfefbd8c54ea78414e8cda7eca
Cr-Commit-Position: refs/heads/master@{#319815}

Powered by Google App Engine
This is Rietveld 408576698