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

Side by Side Diff: content/browser/download/download_job.h

Issue 2794683002: set content length limit if half open range request fails (Closed)
Patch Set: new comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/byte_stream.h" 10 #include "content/browser/byte_stream.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 protected: 46 protected:
47 void StartDownload() const; 47 void StartDownload() const;
48 void Interrupt(DownloadInterruptReason reason); 48 void Interrupt(DownloadInterruptReason reason);
49 49
50 // Add a byte stream to the download sink. Return false if we start to 50 // Add a byte stream to the download sink. Return false if we start to
51 // destroy download file. 51 // destroy download file.
52 bool AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader, 52 bool AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader,
53 int64_t offset, 53 int64_t offset,
54 int64_t length); 54 int64_t length);
55 55
56 // Sets the potential length of the file.
57 void SetPotentialFileLength(int64_t length);
58
56 DownloadItemImpl* download_item_; 59 DownloadItemImpl* download_item_;
57 60
58 private: 61 private:
59 // If the download progress is paused by the user. 62 // If the download progress is paused by the user.
60 bool is_paused_; 63 bool is_paused_;
61 64
62 DISALLOW_COPY_AND_ASSIGN(DownloadJob); 65 DISALLOW_COPY_AND_ASSIGN(DownloadJob);
63 }; 66 };
64 67
65 } // namespace content 68 } // namespace content
66 69
67 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_ 70 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698