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

Unified Diff: content/browser/download/parallel_download_job.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
« no previous file with comments | « content/browser/download/parallel_download_job.h ('k') | content/public/test/test_file_error_injector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/parallel_download_job.cc
diff --git a/content/browser/download/parallel_download_job.cc b/content/browser/download/parallel_download_job.cc
index 5a3af37402aec99f0743fa73cbc5b583f4a12cb0..539f29be4d0b1a9d4d1d28f4dd5a267329e315ab 100644
--- a/content/browser/download/parallel_download_job.cc
+++ b/content/browser/download/parallel_download_job.cc
@@ -97,6 +97,17 @@ bool ParallelDownloadJob::UsesParallelRequests() const {
return true;
}
+void ParallelDownloadJob::CancelRequestWithOffset(int64_t offset) {
+ if (initial_request_offset_ == offset) {
+ DownloadJobImpl::Cancel(false);
+ return;
+ }
+
+ auto it = workers_.find(offset);
+ if (it != workers_.end())
+ it->second->Cancel();
+}
+
void ParallelDownloadJob::BuildParallelRequestAfterDelay() {
DCHECK(workers_.empty());
DCHECK(!requests_sent_);
« no previous file with comments | « content/browser/download/parallel_download_job.h ('k') | content/public/test/test_file_error_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698