Chromium Code Reviews| Index: content/browser/download/parallel_download_utils.cc |
| diff --git a/content/browser/download/parallel_download_utils.cc b/content/browser/download/parallel_download_utils.cc |
| index 4327d8d909a4fa76802fcd63c7ecb543320a04fa..b89b81ee223ee182729af06c977e32ea6e02b7bb 100644 |
| --- a/content/browser/download/parallel_download_utils.cc |
| +++ b/content/browser/download/parallel_download_utils.cc |
| @@ -43,10 +43,11 @@ bool compareReceivedSlices(const DownloadItem::ReceivedSlice& lhs, |
| } // namespace |
| bool ShouldUseParallelDownload(const DownloadCreateInfo& create_info) { |
| + // To enable parallel download, following conditions need to be satisfied. |
| // 1. Accept-Ranges, Content-Length and strong validators response headers. |
| // 2. Feature |kParallelDownloading| enabled. |
| // 3. Content-Length is no less than the minimum slice size configuration. |
| - // 3. TODO(xingliu) HTTP/1.1 protocol, not QUIC or HTTP/2. |
| + // 3. HTTP/1.1 protocol, not QUIC or HTTP/2. |
|
asanka
2017/03/20 20:47:23
Nor HTTP 1.0.
xingliu
2017/03/21 17:15:07
Done.
|
| // Etag and last modified are stored into DownloadCreateInfo in |
| // DownloadRequestCore only if the response header complies to the strong |
| @@ -56,6 +57,8 @@ bool ShouldUseParallelDownload(const DownloadCreateInfo& create_info) { |
| return has_strong_validator && create_info.accept_range && |
| create_info.total_bytes >= GetMinSliceSizeConfig() && |
| + create_info.connection_info == |
| + net::HttpResponseInfo::CONNECTION_INFO_HTTP1_1 && |
| base::FeatureList::IsEnabled(features::kParallelDownloading); |
| } |