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

Unified Diff: content/browser/service_worker/service_worker_cache_storage.h

Issue 510813002: Organize ServiceWorkerCacheStorage's methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guarantee2
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_cache_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ca2adc3c060bb99ead2daf729850a993dc58e25e..666ae6287a3da85c13ffcfc0293600deb4029dbf 100644
--- a/content/browser/service_worker/service_worker_cache_storage.h
+++ b/content/browser/service_worker/service_worker_cache_storage.h
@@ -99,10 +99,15 @@ class CONTENT_EXPORT ServiceWorkerCacheStorage {
typedef std::map<CacheID, CacheContext*> CacheMap;
typedef std::map<std::string, CacheID> NameMap;
+ // Scans the filesystem for stored caches and creates a CacheContext (without
+ // instantiating a backend) for each.
+ void LazyInit(const base::Closure& closure);
+
CacheContext* GetLoadedCache(const std::string& cache_name) const;
+ CacheContext* AddCacheToMaps(const std::string& cache_name,
+ scoped_ptr<ServiceWorkerCache> cache);
- // Initializer and its callback are below.
- void LazyInit(const base::Closure& closure);
+ // The initialization callbacks are below.
static void LazyInitDidLoadIndex(
const base::Closure& callback,
base::WeakPtr<ServiceWorkerCacheStorage> storage,
@@ -116,14 +121,6 @@ class CONTENT_EXPORT ServiceWorkerCacheStorage {
scoped_ptr<ServiceWorkerCache> cache);
static void LazyInitDone(base::WeakPtr<ServiceWorkerCacheStorage> storage);
- static void DidCreateBackend(base::WeakPtr<ServiceWorkerCache> cache,
- CacheID cache_id,
- const CacheAndErrorCallback& callback,
- ServiceWorkerCache::ErrorType error);
-
- CacheContext* AddCacheToMaps(const std::string& cache_name,
- scoped_ptr<ServiceWorkerCache> cache);
-
// The CreateCache callbacks are below.
static void CreateCacheDidCreateCache(
const std::string& cache_name,
@@ -144,6 +141,11 @@ class CONTENT_EXPORT ServiceWorkerCacheStorage {
static void DeleteCacheDidCleanUp(const BoolAndErrorCallback& callback,
bool success);
+ static void DidCreateBackend(base::WeakPtr<ServiceWorkerCache> cache,
+ CacheID cache_id,
+ const CacheAndErrorCallback& callback,
+ ServiceWorkerCache::ErrorType error);
+
// Whether or not we've loaded the list of cache names into memory.
bool initialized_;
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_cache_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698