From 78c0c9e23c13864112a91dfcbfce4a282d689afc Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Thu, 27 May 2010 00:47:47 +0000 Subject: 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 --- net/http/http_cache.cc | 4 ++++ net/http/http_cache.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'net/http') 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* 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* trans); virtual HttpCache* GetCache(); -- cgit v1.1