Index: net/base/file_stream_context.cc |
diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc |
index 43825e3109452b62a343ac17ce04f5067377ea8a..5d1fdbb013054412bbd03fb94d262ea2dd4d3712 100644 |
--- a/net/base/file_stream_context.cc |
+++ b/net/base/file_stream_context.cc |
@@ -274,21 +274,16 @@ void FileStream::Context::CloseAndDelete() { |
DCHECK(!async_in_progress_); |
if (file_.IsValid()) { |
- bool posted = task_runner_.get()->PostTaskAndReply( |
+ bool posted = task_runner_.get()->PostTask( |
FROM_HERE, |
base::Bind(base::IgnoreResult(&Context::CloseFileImpl), |
- base::Unretained(this)), |
- base::Bind(&Context::OnCloseCompleted, base::Unretained(this))); |
+ base::Owned(this))); |
DCHECK(posted); |
} else { |
delete this; |
} |
} |
-void FileStream::Context::OnCloseCompleted() { |
- delete this; |
-} |
- |
Int64CompletionCallback FileStream::Context::IntToInt64( |
const CompletionCallback& callback) { |
return base::Bind(&CallInt64ToInt, callback); |