Make ServiceWorkerCacheStorage::CacheLoader::LoadCache synchronous
commit43027f011bbc299acd7c4b67a9307ac9512e1df3
authorjkarlin <jkarlin@chromium.org>
Thu, 11 Sep 2014 13:12:30 +0000 (11 06:12 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 11 Sep 2014 13:14:16 +0000 (11 13:14 +0000)
treefdb8c676711ba868e8ea9e7ff8804ef479e1f26f
parentadf4bb5d29f54b7acad16aefa44e3515314b8561
Make ServiceWorkerCacheStorage::CacheLoader::LoadCache synchronous

The CacheLoader has two functions for creating a cache:
1. LoadCache -- mkdir the cache directory and load the cache into memory
2. CreateCache  -- rm -rf the directory and then call LoadCache

This CL:

1. Makes LoadCache synchronous by moving the mkdir to CreateCache (in case of loading an existing cache the mkdir was unnecessary)
2. Deletes a bunch of async code
3. Renames LoadCache to CreateServiceWorkerCache

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

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

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