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

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: Created 7 years, 4 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
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 54526247e9196697d82a23c5550bb19b76e11acf..eddd115c97a2504ed9bbe0ee0559346743236f05 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -246,14 +246,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

Powered by Google App Engine
This is Rietveld 408576698