Index: content/browser/download/download_file_impl.h |
diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h |
index 61f1f4d90bb054a524b32e402f78111c7d1de5a0..5858a7fb8ed0ec4813a758da3b702a44506aa8eb 100644 |
--- a/content/browser/download/download_file_impl.h |
+++ b/content/browser/download/download_file_impl.h |
@@ -176,6 +176,15 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { |
// Called before the data is written to disk. |
void WillWriteToDisk(size_t data_len); |
+ // For a given SourceStream object and the bytes it has read, determine the |
+ // actual number of bytes it can write to the disk. For parallel downloading, |
+ // if the target location is already written by another worker, the current |
xingliu
2017/03/11 00:11:46
nit%: We actually check this only before the first
qinmin
2017/03/14 23:24:50
Done.
Yes, a half open request will stop when a la
|
+ // stream should stop writing, Returns true if the stream can write no more |
+ // data and should be finished, returns false otherwise. |
+ bool CalculateBytesToWrite(SourceStream* source_stream, |
+ size_t bytes_read, |
+ size_t* bytes_to_write); |
+ |
// Called when there's some activity on the byte stream that needs to be |
// handled. |
void StreamActive(SourceStream* source_stream); |