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

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

Issue 2828073002: Fix an issue that we didn't clean url request properly. (Closed)
Patch Set: 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_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index b4a1d46dfd2b3f407c0fab0a68a94bf8d7f7bcd5..e46aca2272e6115fa09e8341e83d95172d80d205 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -1061,6 +1061,12 @@ void DownloadItemImpl::UpdateValidatorsOnResumption(
// notified when the download transitions to the IN_PROGRESS state.
}
+void DownloadItemImpl::CancelRequestWithOffset(int64_t offset) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ if (job_)
+ job_->CancelRequestWithOffset(offset);
+}
+
void DownloadItemImpl::NotifyRemoved() {
for (auto& observer : observers_)
observer.OnDownloadRemoved(this);
@@ -1313,6 +1319,8 @@ void DownloadItemImpl::StartDownload() {
base::Unretained(download_file_.get()),
base::Bind(&DownloadItemImpl::OnDownloadFileInitialized,
weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&DownloadItemImpl::CancelRequestWithOffset,
+ weak_ptr_factory_.GetWeakPtr()),
received_slices_));
}
« no previous file with comments | « content/browser/download/download_item_impl.h ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698