Chromium Code Reviews| 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 |