summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/http/http_cache.cc4
-rw-r--r--net/http/http_cache.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 11dac6a..964d1b9 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -324,6 +324,10 @@ int HttpCache::GetBackend(disk_cache::Backend** backend,
return CreateBackend(backend, callback);
}
+disk_cache::Backend* HttpCache::GetCurrentBackend() {
+ return disk_cache_.get();
+}
+
int HttpCache::CreateTransaction(scoped_ptr<HttpTransaction>* trans) {
// Do lazy initialization of disk cache if needed.
if (!disk_cache_.get())
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 177bdc7..2f1513d 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -145,6 +145,9 @@ class HttpCache : public HttpTransactionFactory,
// receives the |backend| must remain valid until the operation completes.
int GetBackend(disk_cache::Backend** backend, CompletionCallback* callback);
+ // Returns the current backend (can be NULL).
+ disk_cache::Backend* GetCurrentBackend();
+
// HttpTransactionFactory implementation:
virtual int CreateTransaction(scoped_ptr<HttpTransaction>* trans);
virtual HttpCache* GetCache();