| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Get the time delay to send parallel requests after the response of original | 50 // Get the time delay to send parallel requests after the response of original |
| 51 // request is handled. | 51 // request is handled. |
| 52 CONTENT_EXPORT base::TimeDelta GetParallelRequestDelayConfig(); | 52 CONTENT_EXPORT base::TimeDelta GetParallelRequestDelayConfig(); |
| 53 | 53 |
| 54 // Get the required remaining time before creating parallel requests. | 54 // Get the required remaining time before creating parallel requests. |
| 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 |
| 61 // block that starts from offset 0. If the first slice doesn't start from offset |
| 62 // 0, return 0. |
| 63 CONTENT_EXPORT int64_t GetMaxContiguousDataBlockSizeFromBeginning( |
| 64 const DownloadItem::ReceivedSlices& slices); |
| 60 } // namespace content | 65 } // namespace content |
| 61 | 66 |
| 62 #endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ | 67 #endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_UTILS_H_ |
| OLD | NEW |