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

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

Issue 2742093002: Glue parallel download job and download file together. (Closed)
Patch Set: Rebase, and adjust unittests with recent landed CLs. 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_utils.h
diff --git a/content/browser/download/parallel_download_utils.h b/content/browser/download/parallel_download_utils.h
index 0844e8d9c0e1e7d437629d4820aa43f0bc99dce5..c8cef6f9fa2e3d2d7e918a6cb95e55015cddc63e 100644
--- a/content/browser/download/parallel_download_utils.h
+++ b/content/browser/download/parallel_download_utils.h
@@ -7,11 +7,23 @@
#include <vector>
+#include "content/browser/download/download_create_info.h"
#include "content/common/content_export.h"
#include "content/public/browser/download_item.h"
namespace content {
+// Return if the download should be a parallel download.
+CONTENT_EXPORT bool ShouldUseParallelDownload(
+ const DownloadCreateInfo& create_info);
+
+// Return the slices to download for the remaining content.
+// This function chunks the content into slices.
+CONTENT_EXPORT std::vector<DownloadItem::ReceivedSlice>
+FindSlicesForRemainingContent(int64_t bytes_received,
+ int64_t content_length,
+ int request_count);
+
// Given an array of slices that are received, returns an array of slices to
// download. |received_slices| must be ordered by offsets.
CONTENT_EXPORT std::vector<DownloadItem::ReceivedSlice> FindSlicesToDownload(
« no previous file with comments | « content/browser/download/parallel_download_job_unittest.cc ('k') | content/browser/download/parallel_download_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698