Index: content/browser/download/download_item_impl.h |
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h |
index 2086a54a89d80e88e51b9e1fb5f7409a1f4469f4..d9f610f50ab9bca6b1eb13b5d35c548ae9fb1d24 100644 |
--- a/content/browser/download/download_item_impl.h |
+++ b/content/browser/download/download_item_impl.h |
@@ -17,10 +17,11 @@ |
#include "base/timer/timer.h" |
#include "content/browser/download/download_net_log_parameters.h" |
#include "content/browser/download/download_request_handle.h" |
+#include "content/browser/loader/global_routing_id.h" |
#include "content/common/content_export.h" |
#include "content/public/browser/download_destination_observer.h" |
+#include "content/public/browser/download_interrupt_reasons.h" |
#include "content/public/browser/download_item.h" |
-#include "net/base/net_errors.h" |
#include "net/base/net_log.h" |
#include "url/gurl.h" |
@@ -75,16 +76,6 @@ class CONTENT_EXPORT DownloadItemImpl |
const DownloadCreateInfo& info, |
const net::BoundNetLog& bound_net_log); |
- // Constructing for the "Save Page As..." feature: |
- // |bound_net_log| is constructed externally for our use. |
- DownloadItemImpl(DownloadItemImplDelegate* delegate, |
- uint32 id, |
- const base::FilePath& path, |
- const GURL& url, |
- const std::string& mime_type, |
- scoped_ptr<DownloadRequestHandleInterface> request_handle, |
- const net::BoundNetLog& bound_net_log); |
- |
virtual ~DownloadItemImpl(); |
// DownloadItem |
@@ -163,13 +154,18 @@ class CONTENT_EXPORT DownloadItemImpl |
// INTERRUPTED state. |
virtual ResumeMode GetResumeMode() const; |
+ // Notify the download item that new origin information is available due to a |
+ // resumption request receiving a response. |
+ virtual void MergeOriginInfoOnResume( |
+ const DownloadCreateInfo& new_create_info); |
+ |
// State transition operations on regular downloads -------------------------- |
// Start the download. |
// |download_file| is the associated file on the storage medium. |
// |req_handle| is the new request handle associated with the download. |
virtual void Start(scoped_ptr<DownloadFile> download_file, |
- scoped_ptr<DownloadRequestHandleInterface> req_handle); |
+ scoped_ptr<DownloadRequestHandle> req_handle); |
// Needed because of intertwining with DownloadManagerImpl ------------------- |
@@ -335,7 +331,8 @@ class CONTENT_EXPORT DownloadItemImpl |
void Completed(); |
// Callback invoked when the URLRequest for a download resumption has started. |
- void OnResumeRequestStarted(DownloadItem* item, net::Error error); |
+ void OnResumeRequestStarted(DownloadItem* item, |
+ DownloadInterruptReason interrupt_reason); |
// Helper routines ----------------------------------------------------------- |
@@ -383,7 +380,7 @@ class CONTENT_EXPORT DownloadItemImpl |
// The handle to the request information. Used for operations outside the |
// download system. |
- scoped_ptr<DownloadRequestHandleInterface> request_handle_; |
+ scoped_ptr<DownloadRequestHandle> request_handle_; |
uint32 download_id_; |
@@ -426,6 +423,9 @@ class CONTENT_EXPORT DownloadItemImpl |
// Whether the download was triggered with a user gesture. |
bool has_user_gesture_; |
+ // Route associated with this download. |
+ GlobalRoutingID route_id_; |
+ |
// Information from the request. |
// Content-disposition field from the header. |
std::string content_disposition_; |