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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host_request_info.h

Issue 3127008: Preliminary work on resuming downloads whose connections have expired.
Patch Set: Waiting to send download automation error message until after other downloads are canceled. Created 10 years, 3 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
Index: chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
index f5b7535aaf865d40f086731825f73da640d10373..78e3a556ba47815f3cf113be44df186d6c0c988e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
@@ -160,6 +160,15 @@ class ResourceDispatcherHostRequestInfo : public URLRequest::UserData {
int host_renderer_id() const { return host_renderer_id_; }
int host_render_view_id() const { return host_render_view_id_; }
+ // Request had a network error, and a new request must be issued. Should be
+ // used only by DownloadResourceHandler::OnResponseStarted().
+ bool was_interrupted() const { return was_interrupted_; }
+ void set_was_interrupted(bool interrupted) { was_interrupted_ = interrupted; }
+
+ // How many bytes were read before this request was interrupted.
+ int64 interrupted_bytes() const { return interrupted_bytes_; }
+ void set_interrupted_bytes(int64 bytes) { interrupted_bytes_ = bytes; }
+
private:
friend class ResourceDispatcherHost;
@@ -221,6 +230,8 @@ class ResourceDispatcherHostRequestInfo : public URLRequest::UserData {
bool called_on_response_started_;
bool has_started_reading_;
int paused_read_bytes_;
+ bool was_interrupted_;
+ int64 interrupted_bytes_;
// The following two members are specified if the request is initiated by
// a plugin like Gears.

Powered by Google App Engine
This is Rietveld 408576698