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

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: Created 8 years, 1 month 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 9e055cef75a9effdde88038d71b38123a10adbfd..c7f6252fb14cf38844e2473b7c5125a0b07afb43 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -198,7 +198,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);
}
}
@@ -310,7 +311,6 @@ void BaseFile::Close() {
// theres not much we can do. But we might in the future.
file_stream_->FlushSync();
#endif
- file_stream_->CloseSync();
ClearStream();
}
}

Powered by Google App Engine
This is Rietveld 408576698