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

Unified Diff: net/base/upload_file_element_reader.cc

Issue 10701050: net: Implement canceling of all async operations in FileStream. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Correct fix for UploadFileElementReader Created 8 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/upload_file_element_reader.cc
===================================================================
--- net/base/upload_file_element_reader.cc (revision 157712)
+++ net/base/upload_file_element_reader.cc (working copy)
@@ -41,7 +41,6 @@
if (rv < 0) {
DLOG(WARNING) << "Failed to seek \"" << path.value()
<< "\" to offset: " << range_offset << " (" << rv << ")";
- file_stream->CloseSync();
file_stream.reset();
}
}
@@ -91,8 +90,7 @@
UploadFileElementReader::~UploadFileElementReader() {
// Temporarily allow until fix: http://crbug.com/72001.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- if (file_stream_.get())
- file_stream_->CloseSync();
+ file_stream_.reset();
}
int UploadFileElementReader::Init(const CompletionCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698