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

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

Issue 2794683002: set content length limit if half open range request fails (Closed)
Patch Set: new 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file.h
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index 33b444e68c27b9830a1b172d03550dafdda525fb..cea23175752d648403c4a49729da452ced714430 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -75,6 +75,14 @@ class CONTENT_EXPORT DownloadFile {
// Abort the download and automatically close the file.
virtual void Cancel() = 0;
+ // Sets the potential file length. This is called when a half-open range
+ // request fails or completes successfully. If the range request fails, the
+ // file length should not be larger than the request's offset. If the range
+ // request completes successfully, the file length can be determined by
+ // the request offset and the bytes received. So |length| may not be the
+ // actual file length, but it should not be smaller than it.
+ virtual void SetPotentialFileLength(int64_t length) = 0;
+
virtual const base::FilePath& FullPath() const = 0;
virtual bool InProgress() const = 0;
virtual void WasPaused() = 0;
« no previous file with comments | « no previous file | content/browser/download/download_file_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698