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

Unified Diff: content/browser/download/base_file.cc

Issue 10701050: net: Implement canceling of all async operations in FileStream. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Update after http://crrev.com/159454 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: content/browser/download/base_file.cc
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index cc7871fcedde3d1a34ba8488651b4e4f96a7b20a..1549ceb2986f9d2800de4ace221eb02cbccfe077 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -417,7 +417,8 @@ void BaseFile::Cancel() {
if (!full_path_.empty()) {
bound_net_log_.AddEvent(net::NetLog::TYPE_DOWNLOAD_FILE_DELETED);
- file_util::Delete(full_path_, false);
+ bool deleted = file_util::Delete(full_path_, false);
+ DCHECK(deleted);
}
}
@@ -529,7 +530,6 @@ void BaseFile::Close() {
// theres not much we can do. But we might in the future.
file_stream_->FlushSync();
#endif
- file_stream_->CloseSync();
ClearStream(net::OK);
}
}

Powered by Google App Engine
This is Rietveld 408576698