| 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 32a22b44984766480bb5d432646b6aad47500116..9a53d7f7fa90738affdf7afe74496b28cebdb214 100644
|
| --- a/net/disk_cache/simple/simple_entry_impl.cc
|
| +++ b/net/disk_cache/simple/simple_entry_impl.cc
|
| @@ -891,11 +891,13 @@ void SimpleEntryImpl::WriteDataInternal(int stream_index,
|
| }
|
|
|
| void SimpleEntryImpl::DoomEntryInternal(const CompletionCallback& callback) {
|
| + if (backend_)
|
| + backend_->OnDoomStart(entry_hash_);
|
| PostTaskAndReplyWithResult(
|
| worker_pool_, FROM_HERE,
|
| base::Bind(&SimpleSynchronousEntry::DoomEntry, path_, key_, entry_hash_),
|
| - base::Bind(&SimpleEntryImpl::DoomOperationComplete, this, callback,
|
| - state_));
|
| + base::Bind(&SimpleEntryImpl::DoomOperationComplete,
|
| + this, backend_, callback, state_));
|
| state_ = STATE_IO_PENDING;
|
| }
|
|
|
| @@ -1069,10 +1071,14 @@ void SimpleEntryImpl::WriteOperationComplete(
|
| stream_index, completion_callback, *entry_stat, result.Pass());
|
| }
|
|
|
| -void SimpleEntryImpl::DoomOperationComplete(const CompletionCallback& callback,
|
| - State state_to_restore,
|
| - int result) {
|
| +void SimpleEntryImpl::DoomOperationComplete(
|
| + const base::WeakPtr<SimpleBackendImpl>& backend,
|
| + const CompletionCallback& callback,
|
| + State state_to_restore,
|
| + int result) {
|
| state_ = state_to_restore;
|
| + if (backend)
|
| + backend->OnDoomComplete(entry_hash_);
|
| if (!callback.is_null())
|
| callback.Run(result);
|
| RunNextOperationIfNeeded();
|
|
|