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

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

Issue 2812263004: Properly handle the case when a parallel download becomes non-parallel (Closed)
Patch Set: rebase 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/download_item_impl.cc ('k') | content/browser/download/parallel_download_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3e334f7da764e2878762d06bec5bccecd99ff430..3c65a84a955e0ec4fbb290cf3b70c6b938b9b67d 100644
--- a/content/browser/download/parallel_download_utils.h
+++ b/content/browser/download/parallel_download_utils.h
@@ -57,6 +57,11 @@ CONTENT_EXPORT base::TimeDelta GetParallelRequestRemainingTimeConfig();
// Print the states of received slices for debugging.
CONTENT_EXPORT void DebugSlicesInfo(const DownloadItem::ReceivedSlices& slices);
+// Given an ordered array of slices, get the maximum size of a contiguous data
+// block that starts from offset 0. If the first slice doesn't start from offset
+// 0, return 0.
+CONTENT_EXPORT int64_t GetMaxContiguousDataBlockSizeFromBeginning(
+ const DownloadItem::ReceivedSlices& slices);
} // namespace content
#endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/parallel_download_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698