DescriptionExpose ServiceWorkerCache objects to ServiceWorkerCacheStorageManager clients.
The CL provides reference counted ServiceWorkerCaches on ServiceWorkerCacheStorage::Get and Create. Previously only CacheIDs were provided from those functions and there was no way for the client to access the ServiceWorkerCache itself.
This CL makes the following modifications:
1. Make ServiceWorkerCache refcounted
2. Return ServiceWorkerCache* instead of a CacheID from Create() and Put()
3. Removed CacheID from ServiceWorkerCache
4. Removed CacheContext from ServiceWorkerCache (since it really only existed to hold a CacheID)
5. Now keeps track of CacheIDs in ServiceWorkerCacheListener
6. Added memory unit tests
Related CLs:
1. https://crrev.com/542703002: Change ownership of the parameters to ServiceWorkerCache:: Put and Match.
2. https://crrev.com/545533002: Move ServiceWorkerCache backend creation to a lazy init function.
3. https://crrev.com/548533002: Make ServiceWorkerCacheStorage::CacheLoader::LoadCache synchronous
* 4. https://crrev.com/549493002: Expose ServiceWorkerCache objects to ServiceWorkerCacheStorageManager clients.
BUG=392621
Committed: https://crrev.com/69909ccc9c1163bf4718ebb87ea1be42fef87ae4
Cr-Commit-Position: refs/heads/master@{#294392}
Patch Set 1 #Patch Set 2 : Check backend_ before use and comment nits (and rebase) #Patch Set 3 : Fix after rebase #
Total comments: 4
Patch Set 4 : Rebase #Patch Set 5 : One CacheID per cache #Patch Set 6 : Fix up some comments #
Total comments: 2
Patch Set 7 : Rebase #Patch Set 8 : Early return instead of dcheck #Patch Set 9 : Fix rebase issue #Messages
Total messages: 24 (10 generated)
|