From cfc076ec466fc48e91c309448c4e5be3467b42c7 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Sat, 7 Nov 2009 02:27:23 +0000 Subject: Clear disk cache when the cache is not initialized BUG=24765 TEST=unit test, clear browsing data and the cache, media cache will be cleared even if a media object was not loaded. Since the disk cache backend in HttpCache is lazily initialized, clearing the cache before it receives the first transaction would have no effect. So initialize the disk cache explicitly when we clear the cache. Review URL: http://codereview.chromium.org/378015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31361 0039d316-1c4b-4281-b951-d872f2087c98 --- net/url_request/view_cache_helper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/url_request') diff --git a/net/url_request/view_cache_helper.cc b/net/url_request/view_cache_helper.cc index 1e66d21..80176cc 100644 --- a/net/url_request/view_cache_helper.cc +++ b/net/url_request/view_cache_helper.cc @@ -116,7 +116,7 @@ static disk_cache::Backend* GetDiskCache(URLRequestContext* context) { if (!http_cache) return NULL; - return http_cache->disk_cache(); + return http_cache->GetBackend(); } static std::string FormatStatistics(disk_cache::Backend* disk_cache) { -- cgit v1.1