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

Unified Diff: net/base/file_stream.cc

Issue 23500006: URLFetcher won't call delegate until file is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke's 3rd review Created 7 years, 3 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.h ('k') | net/base/file_stream_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream.cc
diff --git a/net/base/file_stream.cc b/net/base/file_stream.cc
index 85adaece3cd404aaf703330c1be77863e503e749..fd2eb4af3f93f1e227b820815283c4df326c0600 100644
--- a/net/base/file_stream.cc
+++ b/net/base/file_stream.cc
@@ -93,6 +93,19 @@ int FileStream::OpenSync(const base::FilePath& path, int open_flags) {
return context_->OpenSync(path, open_flags_);
}
+int FileStream::Close(const CompletionCallback& callback) {
+ DCHECK(is_async());
+ context_->CloseAsync(callback);
+ return ERR_IO_PENDING;
+}
+
+int FileStream::CloseSync() {
+ DCHECK(!is_async());
+ base::ThreadRestrictions::AssertIOAllowed();
+ context_->CloseSync();
+ return OK;
+}
+
bool FileStream::IsOpen() const {
return context_->file() != base::kInvalidPlatformFileValue;
}
« no previous file with comments | « net/base/file_stream.h ('k') | net/base/file_stream_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698