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

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

Issue 2806653002: Add UMA to track why a download is non-parallel when enabled parallel (Closed)
Patch Set: Polish on the comment. Created 3 years, 8 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
« no previous file with comments | « content/browser/download/parallel_download_utils.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69498140e2860bb4e588a5b854c38de6ffedaba6..5fe904367a0c4946e2ec3a22dab17e89fe88938b 100644
--- a/content/browser/download/parallel_download_utils.cc
+++ b/content/browser/download/parallel_download_utils.cc
@@ -42,26 +42,6 @@ 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. HTTP/1.1 protocol, not QUIC nor HTTP/1.0.
-
- // Etag and last modified are stored into DownloadCreateInfo in
- // DownloadRequestCore only if the response header complies to the strong
- // validator rule.
- bool has_strong_validator =
- !create_info.etag.empty() || !create_info.last_modified.empty();
-
- 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);
-}
-
std::vector<DownloadItem::ReceivedSlice> FindSlicesForRemainingContent(
int64_t current_offset,
int64_t total_length,
« no previous file with comments | « content/browser/download/parallel_download_utils.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698