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

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

Issue 2770303002: Add a helper method to truncate SourceStream's length (Closed)
Patch Set: nit 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 c6a4ae20e7c7febea6ef04e71e3de130913ae9f9..c34a6102c40c3fc1f03bc3152343bc6c877ee289 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -106,6 +106,11 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
// Called after successfully writing a buffer to disk.
void OnWriteBytesToDisk(int64_t bytes_write);
+ // Given a data block that is already written, truncate the length of this
+ // object to avoid overwriting that block.
+ void TruncateLengthWithWrittenDataBlock(int64_t offset,
+ int64_t bytes_written);
+
ByteStreamReader* stream_reader() const { return stream_reader_.get(); }
int64_t offset() const { return offset_; }
int64_t length() const { return length_; }
« 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