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

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

Issue 709003003: Revert of [ServiceWorkerCache Cleanup] Make the state of the cache backend explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@close_async
Patch Set: Created 6 years, 1 month 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.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.h
diff --git a/content/browser/service_worker/service_worker_cache.h b/content/browser/service_worker/service_worker_cache.h
index b443407f91d63a41fbe77d7f3c1ed45a30f2ad19..6683797e99236b9a75d07760068ecd1269e3c75c 100644
--- a/content/browser/service_worker/service_worker_cache.h
+++ b/content/browser/service_worker/service_worker_cache.h
@@ -108,15 +108,6 @@
class BlobReader;
struct KeysContext;
struct PutContext;
-
- // The backend progresses from uninitialized, to open, to closed, and cannot
- // reverse direction. The open step may be skipped.
- enum BackendState {
- BackendUninitialized, // No backend, create backend on first operation.
- BackendOpen, // Backend can be used.
- BackendClosed // Backend cannot be used. All ops should fail.
- };
-
typedef std::vector<disk_cache::Entry*> Entries;
ServiceWorkerCache(
@@ -157,7 +148,7 @@
// success). The callback will always be called. Virtual for tests.
virtual void CreateBackend(const ErrorCallback& callback);
- void InitBackend(const base::Closure& callback);
+ void Init(const base::Closure& callback);
void InitDone(ErrorType error);
void IncPendingOps() { pending_ops_++; }
@@ -180,7 +171,7 @@
net::URLRequestContext* request_context_;
scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_;
base::WeakPtr<storage::BlobStorageContext> blob_storage_context_;
- BackendState backend_state_;
+ bool initialized_;
std::vector<base::Closure> init_callbacks_;
// Whether or not to store data in disk or memory.
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698