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

Unified Diff: net/base/file_stream_context.cc

Issue 211483004: Remove some PlatformFile instances from ChromeOS Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change FileStream destruction logic Created 6 years, 9 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
« no previous file with comments | « net/base/file_stream_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « net/base/file_stream_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698