summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 23:47:40 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 23:47:40 +0000
commit86b41f9d2d37a5f5e09d9e388764ccfddd01a2c0 (patch)
tree81e5696780c3a643e8983d64416dfdca58a97d29 /net
parent8c47d69ca531d30e0ab82377420e5525424b86ce (diff)
downloadchromium_src-86b41f9d2d37a5f5e09d9e388764ccfddd01a2c0.zip
chromium_src-86b41f9d2d37a5f5e09d9e388764ccfddd01a2c0.tar.gz
chromium_src-86b41f9d2d37a5f5e09d9e388764ccfddd01a2c0.tar.bz2
Disk cache: Remove the check for no open entries at destruction
if we are not running a net_unittest. We have no way to enforce that the browser closes all backend entries (HttpCacheTransactions) before deleting the cache. BUG=52366 TEST=none Review URL: http://codereview.chromium.org/3119039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/disk_cache/backend_impl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 2be8d19..f8a67eb 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -536,7 +536,10 @@ void BackendImpl::CleanupCache() {
data_->header.crash = 0;
File::WaitForPendingIO(&num_pending_io_);
- DCHECK(!num_refs_);
+ if (user_flags_ & kNoRandom) {
+ // This is a net_unittest, verify that we are not 'leaking' entries.
+ DCHECK(!num_refs_);
+ }
}
factory_.RevokeAll();
ptr_factory_.InvalidateWeakPtrs();