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

Unified Diff: content/browser/download/download_file_impl.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 | « content/browser/download/download_file.h ('k') | 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 e786c2b38b0fff0400e9f4d9bed85463b60b22b9..0a2cbd832993f36e25d42e619712bd0b48046a84 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -69,6 +69,7 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
const RenameCompletionCallback& callback) override;
void Detach() override;
void Cancel() override;
+ void SetPotentialFileLength(int64_t length) override;
const base::FilePath& FullPath() const override;
bool InProgress() const override;
void WasPaused() override;
@@ -251,6 +252,10 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
// Used to trigger progress updates.
std::unique_ptr<base::RepeatingTimer> update_timer_;
+ // Potential file length. A range request with an offset larger than this
+ // value will fail. So the actual file length cannot be larger than this.
+ int64_t potential_file_length_;
+
// Statistics
size_t bytes_seen_;
base::TimeDelta disk_writes_time_;
« no previous file with comments | « content/browser/download/download_file.h ('k') | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698