summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r--net/disk_cache/backend_impl.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 13b17f4..5ae789e 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -259,7 +259,7 @@ class FinalCleanup : public Task {
};
void FinalCleanup::Run() {
- backend_->StartCleanup();
+ backend_->CleanupCache();
}
} // namespace
@@ -525,22 +525,15 @@ int BackendImpl::SyncInit() {
return disabled_ ? net::ERR_FAILED : net::OK;
}
-void BackendImpl::StartCleanup() {
- Trace("Backend StartCleanup");
- eviction_.Stop();
-
- // Give a chance for any posted evictions to be discarded.
- MessageLoop::current()->PostTask(FROM_HERE,
- factory_.NewRunnableMethod(&BackendImpl::CleanupCache));
-}
-
void BackendImpl::CleanupCache() {
Trace("Backend Cleanup");
+ eviction_.Stop();
+ timer_.Stop();
+
if (init_) {
if (data_)
data_->header.crash = 0;
- timer_.Stop();
File::WaitForPendingIO(&num_pending_io_);
DCHECK(!num_refs_);
}