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

Side by Side Diff: content/browser/download/parallel_download_utils.h

Issue 2823273004: Add new UMA stats for parallelizable download (Closed)
Patch Set: fix test 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 unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « content/browser/download/parallel_download_job.cc ('k') | content/browser/download/parallel_download_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698