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

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

Issue 2730363004: Parallel Download finch config parameters on Chrome client. (Closed)
Patch Set: Use a cleaner api. 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 41ba75beceffe372b04a1a4a06f4c0cc739e4bd8..7383f3e513773626f2db2a7fc5369d06f681a21b 100644
--- a/content/browser/download/parallel_download_job.cc
+++ b/content/browser/download/parallel_download_job.cc
@@ -5,25 +5,17 @@
#include "content/browser/download/parallel_download_job.h"
#include "base/memory/ptr_util.h"
+#include "content/browser/download/parallel_download_utils.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
namespace content {
-namespace {
-
-// TODO(xingliu): Use finch parameters to configure constants.
-// Default number of requests in a parallel download, including the original
-// request.
-const int kParallelRequestCount = 2;
-
-} // namespace
-
ParallelDownloadJob::ParallelDownloadJob(
DownloadItemImpl* download_item,
std::unique_ptr<DownloadRequestHandleInterface> request_handle)
: DownloadJobImpl(download_item, std::move(request_handle)),
- request_num_(kParallelRequestCount) {}
+ request_num_(GetParallelRequestCountConfig()) {}
ParallelDownloadJob::~ParallelDownloadJob() = default;

Powered by Google App Engine
This is Rietveld 408576698