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

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

Issue 14295013: Simple Cache: DoomEntriesBetween() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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_entry_impl.cc
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 1917a88715091ac1a37be9dae3b8fd104b6f4edf..e499de15c24eb2e6bca913fdbcf97569fc5b281f 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -41,18 +41,15 @@ int SimpleEntryImpl::OpenEntry(WeakPtr<SimpleIndex> index,
const CompletionCallback& callback) {
// TODO(gavinp): More closely unify the last_used_ in the
// SimpleSynchronousEntry and the SimpleIndex.
- if (!index || index->UseIfExists(key)) {
felipeg 2013/04/17 16:35:04 please keep this and use the method index->Has(key
pasko-google - do not use 2013/04/17 19:47:52 Oh yes, that's the whole purpose of the index: qui
felipeg 2013/04/18 09:54:59 A stale and valid index (with the correct file ent
- SynchronousCreationCallback sync_creation_callback =
- base::Bind(&SimpleEntryImpl::CreationOperationComplete,
- index, callback, key, entry);
- WorkerPool::PostTask(FROM_HERE,
- base::Bind(&SimpleSynchronousEntry::OpenEntry, path,
- key, MessageLoopProxy::current(),
- sync_creation_callback),
- true);
- return net::ERR_IO_PENDING;
- }
- return net::ERR_FAILED;
+ SynchronousCreationCallback sync_creation_callback =
+ base::Bind(&SimpleEntryImpl::CreationOperationComplete,
+ index, callback, key, entry);
+ WorkerPool::PostTask(FROM_HERE,
+ base::Bind(&SimpleSynchronousEntry::OpenEntry, path,
+ key, MessageLoopProxy::current(),
+ sync_creation_callback),
+ true);
+ return net::ERR_IO_PENDING;
}
// static

Powered by Google App Engine
This is Rietveld 408576698