ServiceWorker CacheID update
commit821ee0da2cd4a3203d30f82c15f34829d0e182c0
authorjkarlin <jkarlin@chromium.org>
Wed, 24 Sep 2014 11:56:28 +0000 (24 04:56 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 24 Sep 2014 11:56:46 +0000 (24 11:56 +0000)
tree80578cc1d1d6905f8a49f83147c7b2044f06a47f
parentc2a8eb06daad25e87595b64c27540a5d52646e91
ServiceWorker CacheID update

Previous design:
1. The renderer needed all references to the same ServiceWorekrCache* to have the same CacheID.
2. The renderer would only send an IPC that a CacheID was deleted when the last reference to the CacheID was deleted in javascript.

After https://codereview.chromium.org/474593002/ and https://codereview.chromium.org/433793002/:
1. The renderer doesn't need all references to the same ServiceWorkerCache* to have the same CacheID.
2. The renderer will send an IPC that a CacheID is deleted after each javascript cache object is deleted.

To address the change on the browser side, simply make a new CacheID for every call to GetCache and CreateCache and delete its corresponding refptr when the CacheID is dropped.

BUG=392621

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

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