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

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

Issue 22859060: Fix race condition for non-open/create operations happening after a doom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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_synchronous_entry.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_synchronous_entry.cc
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index ed91fabdbfd97ae183546f3df0d2e657d80001ea..2dad511a58d24342b481dee39fa0b169639b66f5 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -257,14 +257,13 @@ bool SimpleSynchronousEntry::DeleteFilesForEntryHash(
}
// static
-void SimpleSynchronousEntry::DoomEntry(
+int SimpleSynchronousEntry::DoomEntry(
const FilePath& path,
const std::string& key,
- uint64 entry_hash,
- int* out_result) {
+ uint64 entry_hash) {
DCHECK_EQ(entry_hash, GetEntryHashKey(key));
- bool deleted_well = DeleteFilesForEntryHash(path, entry_hash);
- *out_result = deleted_well ? net::OK : net::ERR_FAILED;
+ const bool deleted_well = DeleteFilesForEntryHash(path, entry_hash);
+ return deleted_well ? net::OK : net::ERR_FAILED;
}
// static
« no previous file with comments | « net/disk_cache/simple/simple_synchronous_entry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698