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

Issue 126603002: Implement registration job ordering (Closed)

Created:
6 years, 11 months ago by alecflett
Modified:
6 years, 11 months ago
Reviewers:
kinuko, michaeln
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Implement registration job ordering To handle the case of multiple registration requests coming in at the same time, the ServiceWorkerJobCoordinator now keeps a queue of registration events for each pattern. When a new registration request comes in for a pattern, it looks to see if the most recent request (at the back of the queue) is identical, and if so, piggy-backs on that request rather than creating a new one. BUG=285976 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243999

Patch Set 1 #

Patch Set 2 : Fix tiny obvious bugs + add 1 test #

Patch Set 3 : Add a bunch of tests #

Patch Set 4 : Fix comments in tests #

Total comments: 16

Patch Set 5 : Address minor comments (all but JobQueue) #

Patch Set 6 : Implement JobQueue #

Patch Set 7 : Simplify callbacks #

Patch Set 8 : Eliminate running_ #

Total comments: 14

Patch Set 9 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -88 lines) Patch
M content/browser/service_worker/service_worker_job_coordinator.h View 1 2 3 4 5 6 7 8 3 chunks +25 lines, -16 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.cc View 1 2 3 4 5 6 7 8 2 chunks +54 lines, -35 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +151 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.h View 1 2 3 4 5 6 7 8 4 chunks +31 lines, -14 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 4 5 6 7 8 6 chunks +53 lines, -23 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
alecflett
ok, here is the follow-on to http://crrev.com/113133013 - no tests yet, but aside from bugs, ...
6 years, 11 months ago (2014-01-07 21:22:42 UTC) #1
alecflett
ok, a decent set of tests has been added.
6 years, 11 months ago (2014-01-07 23:42:25 UTC) #2
kinuko
Ok, the code looks a bit rough but the logic has become clearer now, thanks ...
6 years, 11 months ago (2014-01-08 08:38:35 UTC) #3
alecflett
(implemented everything except JobQueue. Uploaded a patch now in case I don't finish today) https://codereview.chromium.org/126603002/diff/100001/content/browser/service_worker/service_worker_job_coordinator.cc ...
6 years, 11 months ago (2014-01-08 23:59:16 UTC) #4
alecflett
Ok, this is finally ready - PTAL? Implemented the JobQueue, cleaned up some callbacks (we ...
6 years, 11 months ago (2014-01-09 02:05:21 UTC) #5
kinuko
lgtm https://codereview.chromium.org/126603002/diff/230001/content/browser/service_worker/service_worker_job_coordinator.cc File content/browser/service_worker/service_worker_job_coordinator.cc (right): https://codereview.chromium.org/126603002/diff/230001/content/browser/service_worker/service_worker_job_coordinator.cc#newcode42 content/browser/service_worker/service_worker_job_coordinator.cc:42: .Push(job.Pass(), Was this formatting done by clang-format? I ...
6 years, 11 months ago (2014-01-09 10:54:07 UTC) #6
kinuko
some more nits https://codereview.chromium.org/126603002/diff/230001/content/browser/service_worker/service_worker_job_coordinator.cc File content/browser/service_worker/service_worker_job_coordinator.cc (right): https://codereview.chromium.org/126603002/diff/230001/content/browser/service_worker/service_worker_job_coordinator.cc#newcode51 content/browser/service_worker/service_worker_job_coordinator.cc:51: pending_jobs->second.Pop(job); You may also want to ...
6 years, 11 months ago (2014-01-09 14:08:08 UTC) #7
alecflett
Address review comments
6 years, 11 months ago (2014-01-09 20:17:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alecflett@chromium.org/126603002/320001
6 years, 11 months ago (2014-01-09 20:19:12 UTC) #9
alecflett
https://codereview.chromium.org/126603002/diff/230001/content/browser/service_worker/service_worker_job_coordinator.cc File content/browser/service_worker/service_worker_job_coordinator.cc (right): https://codereview.chromium.org/126603002/diff/230001/content/browser/service_worker/service_worker_job_coordinator.cc#newcode42 content/browser/service_worker/service_worker_job_coordinator.cc:42: .Push(job.Pass(), Yes, that was clang-format. the problem was this ...
6 years, 11 months ago (2014-01-09 21:23:14 UTC) #10
commit-bot: I haz the power
6 years, 11 months ago (2014-01-09 22:27:12 UTC) #11
Message was sent while issue was closed.
Change committed as 243999

Powered by Google App Engine
This is Rietveld 408576698