Index: content/browser/appcache/appcache_disk_cache.h |
diff --git a/content/browser/appcache/appcache_disk_cache.h b/content/browser/appcache/appcache_disk_cache.h |
index 6107f5b6b26f767d2a775ce8b1aa1a5d679ce888..98ac3c0a69f3a29ae14e650a0c65f8ea144d52d7 100644 |
--- a/content/browser/appcache/appcache_disk_cache.h |
+++ b/content/browser/appcache/appcache_disk_cache.h |
@@ -52,6 +52,10 @@ class CONTENT_EXPORT AppCacheDiskCache |
const net::CompletionCallback& callback) override; |
int DoomEntry(int64 key, const net::CompletionCallback& callback) override; |
+ void set_is_waiting_to_initialize(bool is_waiting_to_initialize) { |
+ is_waiting_to_initialize_ = is_waiting_to_initialize; |
+ } |
+ |
protected: |
explicit AppCacheDiskCache(bool use_simple_cache); |
disk_cache::Backend* disk_cache() { return disk_cache_.get(); } |
@@ -89,9 +93,10 @@ class CONTENT_EXPORT AppCacheDiskCache |
typedef std::set<ActiveCall*> ActiveCalls; |
typedef std::set<EntryImpl*> OpenEntries; |
- bool is_initializing() const { |
- return create_backend_callback_.get() != NULL; |
+ bool is_initializing_or_waiting_to_initialize() const { |
+ return create_backend_callback_.get() != NULL || is_waiting_to_initialize_; |
} |
+ |
int Init(net::CacheType cache_type, |
const base::FilePath& directory, |
int cache_size, |
@@ -104,6 +109,7 @@ class CONTENT_EXPORT AppCacheDiskCache |
bool use_simple_cache_; |
bool is_disabled_; |
+ bool is_waiting_to_initialize_; |
net::CompletionCallback init_callback_; |
scoped_refptr<CreateBackendCallbackShim> create_backend_callback_; |
PendingCalls pending_calls_; |