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

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

Issue 1544603003: [Downloads] Do not store error responses during resumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unify-downloader-core
Patch Set: Created 4 years, 10 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_item_impl.cc ('k') | content/browser/download/download_request_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_request_core.h
diff --git a/content/browser/download/download_request_core.h b/content/browser/download/download_request_core.h
index 39e96d78c9eddafcd852ef4bec5e33a08e44336b..ac9e9b6cd86dad4bae6c6fcd348885d73410bc39 100644
--- a/content/browser/download/download_request_core.h
+++ b/content/browser/download/download_request_core.h
@@ -60,6 +60,10 @@ class CONTENT_EXPORT DownloadRequestCore
// constructing a DownloadCreateInfo object.
bool OnResponseStarted(const std::string& override_mime_type);
+ // Should be called to handle a redirect. The caller should only allow the
+ // redirect to be followed if the return value is true.
+ bool OnRequestRedirected();
+
// Starts a read cycle. Creates a new IOBuffer which can be passed into
// URLRequest::Read(). Call OnReadCompleted() when the Read operation
// completes.
@@ -67,6 +71,11 @@ class CONTENT_EXPORT DownloadRequestCore
int* buf_size,
int min_size);
+ // Used to notify DownloadRequestCore that the caller is about to abort the
+ // outer request. |reason| will be used as the final interrupt reason when
+ // OnResponseCompleted() is called.
+ void OnWillAbort(DownloadInterruptReason reason);
+
// Should be called when the Read() operation completes. |defer| will be set
// to true if reading is to be suspended. In the latter case, once more data
// can be read, invokes the |on_ready_to_read_callback|.
@@ -143,7 +152,7 @@ class CONTENT_EXPORT DownloadRequestCore
int pause_count_;
bool was_deferred_;
- bool is_resumption_request_;
+ bool is_partial_request_;
bool started_;
// When DownloadRequestCore initiates an abort (by blocking a redirect, for
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/download_request_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698