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

Unified Diff: content/browser/download/download_file_impl.h

Issue 2811293004: Fix an issue that we didn't clean url request properly. (Closed)
Patch Set: Fixed compiling for unit tests. Created 3 years, 8 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/download_file_impl.h
diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h
index b3ce7d9259c8a57f2af114e9ef1ed22edc93719b..23533167701af1f1d30f9c3af3ad5003e5069278 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -13,6 +13,7 @@
#include <memory>
#include <string>
#include <unordered_map>
+#include <unordered_set>
#include <vector>
#include "base/files/file.h"
@@ -249,6 +250,10 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
// starting from offset.
SourceStreams source_streams_;
+ // The offsets of the streams to be closed. Since ByteStreamReader can't close
+ // resource writing to the pipe, we need to close them on UI thread.
+ std::unordered_set<int64_t> streams_to_close_;
+
// Used to trigger progress updates.
std::unique_ptr<base::RepeatingTimer> update_timer_;

Powered by Google App Engine
This is Rietveld 408576698