diff options
-rw-r--r-- | chrome/browser/dom_ui/net_internals_ui.cc | 2 | ||||
-rw-r--r-- | net/http/http_cache.cc | 4 | ||||
-rw-r--r-- | net/http/http_cache.h | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index 9c2611d..0ea96a4 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -74,7 +74,7 @@ disk_cache::Backend* GetDiskCacheBackend(URLRequestContext* context) { if (!http_cache) return NULL; - return http_cache->GetBackend(); + return http_cache->GetCurrentBackend(); } // Serializes the specified event to a DictionaryValue. 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(); |