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

Issue 549493002: Expose ServiceWorkerCache objects to ServiceWorkerCacheStorageManager clients. (Closed)

Created:
6 years, 3 months ago by jkarlin
Modified:
6 years, 3 months ago
Reviewers:
michaeln
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@refptr3
Project:
chromium
Visibility:
Public.

Description

Expose 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+283 lines, -147 lines) Patch
M content/browser/service_worker/service_worker_cache.h View 1 2 3 4 5 7 chunks +18 lines, -12 lines 0 comments Download
M content/browser/service_worker/service_worker_cache.cc View 1 2 3 4 5 6 4 chunks +15 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_listener.h View 1 2 3 4 3 chunks +19 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_listener.cc View 1 2 3 4 5 6 7 4 chunks +33 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage.h View 1 6 chunks +18 lines, -26 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage.cc View 1 2 3 4 5 6 19 chunks +69 lines, -79 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc View 1 2 3 4 5 6 12 chunks +109 lines, -18 lines 0 comments Download
M content/browser/service_worker/service_worker_cache_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (10 generated)
jkarlin
Thanks!
6 years, 3 months ago (2014-09-05 18:13:07 UTC) #3
jkarlin
This one is now ready for review again, thanks!
6 years, 3 months ago (2014-09-09 18:35:07 UTC) #5
michaeln
https://codereview.chromium.org/549493002/diff/70001/content/browser/service_worker/service_worker_cache.h File content/browser/service_worker/service_worker_cache.h (right): https://codereview.chromium.org/549493002/diff/70001/content/browser/service_worker/service_worker_cache.h#newcode72 content/browser/service_worker/service_worker_cache.h:72: // |response| must remain valid until the callback is ...
6 years, 3 months ago (2014-09-09 20:04:59 UTC) #6
jkarlin
Thanks! https://codereview.chromium.org/549493002/diff/70001/content/browser/service_worker/service_worker_cache.h File content/browser/service_worker/service_worker_cache.h (right): https://codereview.chromium.org/549493002/diff/70001/content/browser/service_worker/service_worker_cache.h#newcode72 content/browser/service_worker/service_worker_cache.h:72: // |response| must remain valid until the callback ...
6 years, 3 months ago (2014-09-10 15:06:13 UTC) #7
michaeln
lgtm https://codereview.chromium.org/549493002/diff/130001/content/browser/service_worker/service_worker_cache_listener.cc File content/browser/service_worker/service_worker_cache_listener.cc (right): https://codereview.chromium.org/549493002/diff/130001/content/browser/service_worker/service_worker_cache_listener.cc#newcode238 content/browser/service_worker/service_worker_cache_listener.cc:238: DCHECK(it != id_to_cache_map_.end()); might want to be more ...
6 years, 3 months ago (2014-09-10 18:49:31 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/549493002/150001
6 years, 3 months ago (2014-09-11 13:16:35 UTC) #10
jkarlin
https://codereview.chromium.org/549493002/diff/130001/content/browser/service_worker/service_worker_cache_listener.cc File content/browser/service_worker/service_worker_cache_listener.cc (right): https://codereview.chromium.org/549493002/diff/130001/content/browser/service_worker/service_worker_cache_listener.cc#newcode238 content/browser/service_worker/service_worker_cache_listener.cc:238: DCHECK(it != id_to_cache_map_.end()); On 2014/09/10 18:49:31, michaeln wrote: > ...
6 years, 3 months ago (2014-09-11 13:26:01 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/549493002/170001
6 years, 3 months ago (2014-09-11 13:26:28 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/7773) linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/13182)
6 years, 3 months ago (2014-09-11 13:44:02 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/549493002/190001
6 years, 3 months ago (2014-09-11 13:55:51 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_swarming/builds/8460)
6 years, 3 months ago (2014-09-11 15:02:16 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/549493002/190001
6 years, 3 months ago (2014-09-11 15:05:30 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:190001) as fab5ebd2abc5e52eca01f2c8d3ee9fbed294693d
6 years, 3 months ago (2014-09-11 15:45:15 UTC) #23
commit-bot: I haz the power
6 years, 3 months ago (2014-09-11 15:48:25 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/69909ccc9c1163bf4718ebb87ea1be42fef87ae4
Cr-Commit-Position: refs/heads/master@{#294392}

Powered by Google App Engine
This is Rietveld 408576698