| Index: content/browser/download/download_job_factory.cc
|
| diff --git a/content/browser/download/download_job_factory.cc b/content/browser/download/download_job_factory.cc
|
| index 3123aef43616b2dd6425fccd761619fed170c4f9..12f6e1657b191c83c433989b4ee32f99eeaad4af 100644
|
| --- a/content/browser/download/download_job_factory.cc
|
| +++ b/content/browser/download/download_job_factory.cc
|
| @@ -11,16 +11,13 @@
|
| #include "content/browser/download/download_job.h"
|
| #include "content/browser/download/download_job_impl.h"
|
| #include "content/browser/download/parallel_download_job.h"
|
| +#include "content/browser/download/parallel_download_utils.h"
|
| #include "content/public/common/content_features.h"
|
|
|
| namespace content {
|
|
|
| namespace {
|
|
|
| -// Default minimum file size in bytes to enable a parallel download, 2048KB.
|
| -// TODO(xingliu): Use finch parameters to configure minimum file size.
|
| -const int64_t kMinFileSizeParallelDownload = 2097152;
|
| -
|
| bool ShouldUseParallelDownload(const DownloadCreateInfo& create_info) {
|
| // 1. Accept-Ranges, Content-Length and strong validators response headers.
|
| // 2. Feature |kParallelDownloading| enabled.
|
| @@ -35,7 +32,7 @@ bool ShouldUseParallelDownload(const DownloadCreateInfo& create_info) {
|
| !create_info.etag.empty() || !create_info.last_modified.empty();
|
|
|
| return has_strong_validator && create_info.accept_range &&
|
| - create_info.total_bytes >= kMinFileSizeParallelDownload &&
|
| + create_info.total_bytes >= GetMinFileSizeConfig() &&
|
| base::FeatureList::IsEnabled(features::kParallelDownloading);
|
| }
|
|
|
|
|