Chromium Code Reviews| Index: content/browser/service_worker/service_worker_cache_storage.h |
| diff --git a/content/browser/service_worker/service_worker_cache_storage.h b/content/browser/service_worker/service_worker_cache_storage.h |
| index e15a0f716b2e2fac64c42cdd45f53de4ee1b5bb4..fae7576e056e85a3bf83b139a17ef0a994be3992 100644 |
| --- a/content/browser/service_worker/service_worker_cache_storage.h |
| +++ b/content/browser/service_worker/service_worker_cache_storage.h |
| @@ -42,12 +42,12 @@ class CONTENT_EXPORT ServiceWorkerCacheStorage { |
| CACHE_STORAGE_ERROR_STORAGE, |
| CACHE_STORAGE_ERROR_CLOSING |
| }; |
| - |
| + typedef std::vector<std::string> Strings; |
|
michaeln
2014/09/12 21:45:32
maybe call this StringVector, i was wondering what
jkarlin
2014/09/15 14:14:30
Done.
|
| typedef base::Callback<void(bool, CacheStorageError)> BoolAndErrorCallback; |
| typedef base::Callback<void(const scoped_refptr<ServiceWorkerCache>&, |
| CacheStorageError)> CacheAndErrorCallback; |
| - typedef base::Callback<void(const std::vector<std::string>&, |
| - CacheStorageError)> StringsAndErrorCallback; |
| + typedef base::Callback<void(const Strings&, CacheStorageError)> |
| + StringsAndErrorCallback; |
| ServiceWorkerCacheStorage( |
| const base::FilePath& origin_path, |
| @@ -95,7 +95,8 @@ class CONTENT_EXPORT ServiceWorkerCacheStorage { |
| scoped_refptr<ServiceWorkerCache> GetLoadedCache( |
| const std::string& cache_name); |
| - // Initializer and its callback are below. |
| + // Initializer and its callback are below. While LazyInit is running any new |
| + // operations will be queued and started in order after initialization. |
| void LazyInit(const base::Closure& closure); |
| void LazyInitDidLoadIndex( |
| const base::Closure& callback, |
| @@ -129,6 +130,9 @@ class CONTENT_EXPORT ServiceWorkerCacheStorage { |
| // The map of cache names to ServiceWorkerCache objects. |
| CacheMap cache_map_; |
| + // The names of caches in the order that they were created. |
| + Strings ordered_cache_names_; |
| + |
| // The file path for this CacheStorage. |
| base::FilePath origin_path_; |