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

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

Issue 23823002: Don't doom the wrong simple cache entry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: enable one more test 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/simple/simple_entry_impl.h ('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 e4e7220af7039c26924b58fb4737de40e995aaee..104674c0867bf7ef3f24f8d4f3f7ed6ecc1ff2bc 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -253,6 +253,8 @@ int SimpleEntryImpl::CreateEntry(Entry** out_entry,
}
int SimpleEntryImpl::DoomEntry(const CompletionCallback& callback) {
+ if (doomed_)
+ return net::OK;
net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_CALL);
net_log_.AddEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY_DOOM_BEGIN);
@@ -529,9 +531,9 @@ void SimpleEntryImpl::RemoveSelfFromBackend() {
}
void SimpleEntryImpl::MarkAsDoomed() {
+ doomed_ = true;
if (!backend_.get())
return;
- doomed_ = true;
backend_->index()->Remove(entry_hash_);
RemoveSelfFromBackend();
}
« no previous file with comments | « net/disk_cache/simple/simple_entry_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698