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

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

Issue 2744793003: Move the logic to determine how much data can be written to another function (Closed)
Patch Set: addressing comments Created 3 years, 9 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 | « no previous file | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2a68ca9e4ead53ea9d8d3bf030fd09e2250f98ec..7ccffbab905734b343b644f46047b1faf64acb9f 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -183,6 +183,16 @@ 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 available to write, determine
+ // the actual number of bytes it can write to the disk. For parallel
+ // downloading, if the first disk IO writes to a location that is already
+ // written by another stream, the current 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_available_to_write,
+ 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);
« no previous file with comments | « no previous file | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698