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

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

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.h
diff --git a/content/browser/download/parallel_download_job.h b/content/browser/download/parallel_download_job.h
index 8d02a7984fb2992982c724f9be56fb6586b11d17..70c429877dfcd69045f52fb09fd4e99f7ca05863 100644
--- a/content/browser/download/parallel_download_job.h
+++ b/content/browser/download/parallel_download_job.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/timer/timer.h"
#include "content/browser/download/download_job_impl.h"
#include "content/browser/download/download_worker.h"
#include "content/common/content_export.h"
@@ -60,6 +61,9 @@ class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl {
// Subsequent tasks to send range requests.
WorkerList workers_;
+ // Used to send parallel requests after a delay based on Finch config.
+ std::unique_ptr<base::OneShotTimer> timer_;
qinmin 2017/03/15 05:49:18 You don't need the unique_ptr, just use base::OneS
xingliu 2017/03/15 17:48:52 Done, make sense.
+
DISALLOW_COPY_AND_ASSIGN(ParallelDownloadJob);
};
« no previous file with comments | « no previous file | content/browser/download/parallel_download_job.cc » ('j') | content/browser/download/parallel_download_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698