| Index: content/browser/download/download_item_impl.cc
|
| diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
|
| index 966bbae3807574f5ff580ccdaecb4a680d5046b7..a50f7d477b6f131cf89276a3842834ffd281198f 100644
|
| --- a/content/browser/download/download_item_impl.cc
|
| +++ b/content/browser/download/download_item_impl.cc
|
| @@ -1115,7 +1115,8 @@ void DownloadItemImpl::MarkAsComplete() {
|
| void DownloadItemImpl::DestinationUpdate(
|
| int64_t bytes_so_far,
|
| int64_t bytes_per_sec,
|
| - const std::vector<DownloadItem::ReceivedSlice>& received_slices) {
|
| + const std::vector<DownloadItem::ReceivedSlice>& received_slices,
|
| + const std::unordered_set<int64_t>& stream_to_close) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| // If the download is in any other state we don't expect any
|
| // DownloadDestinationObserver callbacks. An interruption or a cancellation
|
| @@ -1133,6 +1134,12 @@ void DownloadItemImpl::DestinationUpdate(
|
|
|
| UpdateProgress(bytes_so_far, bytes_per_sec);
|
| received_slices_ = received_slices;
|
| +
|
| + if (job_) {
|
| + for (int64_t offset : stream_to_close)
|
| + job_->CancelRequest(offset);
|
| + }
|
| +
|
| if (net_log_.IsCapturing()) {
|
| net_log_.AddEvent(
|
| net::NetLogEventType::DOWNLOAD_ITEM_UPDATED,
|
|
|