OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/browser/download/download_create_info.h" | 10 #include "content/browser/download/download_create_info.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 CONTENT_EXPORT base::TimeDelta GetParallelRequestRemainingTimeConfig(); | 55 CONTENT_EXPORT base::TimeDelta GetParallelRequestRemainingTimeConfig(); |
56 | 56 |
57 // Print the states of received slices for debugging. | 57 // Print the states of received slices for debugging. |
58 CONTENT_EXPORT void DebugSlicesInfo(const DownloadItem::ReceivedSlices& slices); | 58 CONTENT_EXPORT void DebugSlicesInfo(const DownloadItem::ReceivedSlices& slices); |
59 | 59 |
60 // Given an ordered array of slices, get the maximum size of a contiguous data | 60 // Given an ordered array of slices, get the maximum size of a contiguous data |
61 // block that starts from offset 0. If the first slice doesn't start from offset | 61 // block that starts from offset 0. If the first slice doesn't start from offset |
62 // 0, return 0. | 62 // 0, return 0. |
63 CONTENT_EXPORT int64_t GetMaxContiguousDataBlockSizeFromBeginning( | 63 CONTENT_EXPORT int64_t GetMaxContiguousDataBlockSizeFromBeginning( |
64 const DownloadItem::ReceivedSlices& slices); | 64 const DownloadItem::ReceivedSlices& slices); |
| 65 |
| 66 // Returns whether parallel download is enabled. |
| 67 CONTENT_EXPORT bool IsParallelDownloadEnabled(); |
| 68 |
65 } // namespace content | 69 } // namespace content |
66 | 70 |
67 #endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ | 71 #endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ |
OLD | NEW |