summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 00:47:47 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 00:47:47 +0000
commit78c0c9e23c13864112a91dfcbfce4a282d689afc (patch)
treed5375b64916a99e7d246d2ae909f87ec8555aa0b /net/http
parent55e5041fb1cb94092853cafc1e7b479593d715e9 (diff)
downloadchromium_src-78c0c9e23c13864112a91dfcbfce4a282d689afc.zip
chromium_src-78c0c9e23c13864112a91dfcbfce4a282d689afc.tar.gz
chromium_src-78c0c9e23c13864112a91dfcbfce4a282d689afc.tar.bz2
net-internals: use the async interface for displaying cache statistics.
BUG=26729 TEST=none Review URL: http://codereview.chromium.org/2279003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-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();