ServiceWorker: Clean up GetClientDocumentsCallback
commitceb7aa72c36a6dd6ee6ff78c3b14eac0129b9834
authornhiroki <nhiroki@chromium.org>
Fri, 26 Dec 2014 09:22:30 +0000 (26 01:22 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Dec 2014 09:23:14 +0000 (26 09:23 +0000)
tree0ad4e354aba3df29e5b47e31d2ec3db42560c737
parent87b0a20bef6d1a4f02f8b01255a0a262ac0cafd1
ServiceWorker: Clean up GetClientDocumentsCallback

Before this patch, GetClientDocumentsCallback counts the number of pending
GetClientInfoCallback to notice the completion of all dependent tasks.
Actually, this is not necessary because GetClientDocumentsCallback is owned
(only) by GetClientInfoCallback via scoped_refptr and the dtor of
GetClientDocumentsCallback is called when all tasks get completed.

After this patch, GetClientDocumentsCallback relies on the reference count
instead of counting pending tasks by itself and sends a completion message
on its dtor.

BUG=n/a
TEST=should pass all existing tests (just refactoring)

Review URL: https://codereview.chromium.org/822323003

Cr-Commit-Position: refs/heads/master@{#309669}
content/browser/service_worker/service_worker_version.cc
content/browser/service_worker/service_worker_version.h