Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: net/disk_cache/simple/simple_entry_impl.cc

Issue 23591048: Fix Simple Cache race on multiple dooms in flight. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remedaite Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/entry_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_entry_impl.cc
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 3a54a1fa4c0e79d2dd1f7173b5f4aef272fbc4a5..c4cd1d3ce91f83c0524b2f6eed00df4b891fa8a2 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -268,6 +268,8 @@ int SimpleEntryImpl::DoomEntry(const CompletionCallback& callback) {
net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_BEGIN);
MarkAsDoomed();
+ if (backend_.get())
+ backend_->OnDoomStart(entry_hash_);
pending_operations_.push(SimpleEntryOperation::DoomOperation(this, callback));
RunNextOperationIfNeeded();
return net::ERR_IO_PENDING;
@@ -917,8 +919,6 @@ void SimpleEntryImpl::WriteDataInternal(int stream_index,
}
void SimpleEntryImpl::DoomEntryInternal(const CompletionCallback& callback) {
- if (backend_)
- backend_->OnDoomStart(entry_hash_);
PostTaskAndReplyWithResult(
worker_pool_, FROM_HERE,
base::Bind(&SimpleSynchronousEntry::DoomEntry, path_, key_, entry_hash_),
« no previous file with comments | « net/disk_cache/entry_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698