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

Unified Diff: net/base/file_stream_context_win.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: 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
Index: net/base/file_stream_context_win.cc
diff --git a/net/base/file_stream_context_win.cc b/net/base/file_stream_context_win.cc
index 5fb30859e7559996f8d65b4ee52473089ed1dedd..4a666c70a5b98d746e0af948669b74dfbf0d6e80 100644
--- a/net/base/file_stream_context_win.cc
+++ b/net/base/file_stream_context_win.cc
@@ -196,6 +196,15 @@ FileStream::Context::IOResult FileStream::Context::FlushFileImpl() {
return IOResult::FromOSError(GetLastError());
}
+FileStream::Context::IOResult FileStream::Context::CloseFileImpl() {
+ bool success = base::ClosePlatformFile(file_);
+ file_ = base::kInvalidPlatformFileValue;
+ if (success)
+ return IOResult(OK, 0);
+
+ return IOResult::FromOSError(GetLastError());
+}
+
void FileStream::Context::IOCompletionIsPending(
const CompletionCallback& callback,
IOBuffer* buf) {

Powered by Google App Engine
This is Rietveld 408576698