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

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

Issue 2750853004: Add a delay to send the parallel requests. (Closed)
Patch Set: Created 3 years, 9 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/parallel_download_job.cc
diff --git a/content/browser/download/parallel_download_job.cc b/content/browser/download/parallel_download_job.cc
index c8bba093fa4d9ed30d7e44329826058fa4f3727c..92981ef56ed2ec22f28e1912dac344fefdd7808a 100644
--- a/content/browser/download/parallel_download_job.cc
+++ b/content/browser/download/parallel_download_job.cc
@@ -25,7 +25,9 @@ ParallelDownloadJob::~ParallelDownloadJob() = default;
void ParallelDownloadJob::Start() {
DownloadJobImpl::Start();
- BuildParallelRequests();
+ timer_ = base::MakeUnique<base::OneShotTimer>();
+ timer_->Start(FROM_HERE, GetParallelRequestDelayConfig(), this,
+ &ParallelDownloadJob::BuildParallelRequests);
}
void ParallelDownloadJob::Cancel(bool user_cancel) {

Powered by Google App Engine
This is Rietveld 408576698