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

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

Issue 11571025: Initial CL for Downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed CanResumeDownload (unused) and updated comment in RDH::BeginDownload. Created 7 years, 12 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: content/browser/download/download_manager_impl.h
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 0e6d6ba1d0ca1b9d44c65e9bd86a934e02d6b2af..c3159a503834cd129daf4f6e366e5fee92e96214 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -18,6 +18,7 @@
#include "content/browser/download/download_item_impl_delegate.h"
#include "content/common/content_export.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/download_url_parameters.h"
namespace net {
class BoundNetLog;
@@ -98,9 +99,11 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
virtual ~DownloadManagerImpl();
- // Creates the download item. Must be called on the UI thread.
- virtual DownloadItemImpl* CreateDownloadItem(
- DownloadCreateInfo* info, const net::BoundNetLog& bound_net_log);
+ // Retrieves the download item corresponding to the passed
+ // DownloadCreateInfo. This will create the download item
+ // if this is a new download (common case) or retrieve an
+ // existing download item if this is a resuming download.
+ virtual DownloadItemImpl* GetOrCreateDownloadItem(DownloadCreateInfo* info);
// Get next download id.
DownloadId GetNextId();
@@ -127,6 +130,9 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
DownloadItemImpl* item,
const ShouldOpenDownloadCallback& callback) OVERRIDE;
virtual void CheckForFileRemoval(DownloadItemImpl* download_item) OVERRIDE;
+ virtual void ResumeInterruptedDownload(
+ scoped_ptr<content::DownloadUrlParameters> params,
+ content::DownloadId id) OVERRIDE;
virtual void DownloadOpened(DownloadItemImpl* download) OVERRIDE;
virtual void DownloadRemoved(DownloadItemImpl* download) OVERRIDE;
virtual void ShowDownloadInBrowser(DownloadItemImpl* download) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698