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

Unified Diff: content/public/browser/resource_dispatcher_host.h

Issue 11571025: Initial CL for Downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Pawel's comment. Created 7 years, 11 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/public/browser/download_url_parameters.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/resource_dispatcher_host.h
diff --git a/content/public/browser/resource_dispatcher_host.h b/content/public/browser/resource_dispatcher_host.h
index 5762d4f36510d114a32d7146c7ecd270d71d12db..3b982dce0231b813bf0451060423422cd0bd7578 100644
--- a/content/public/browser/resource_dispatcher_host.h
+++ b/content/public/browser/resource_dispatcher_host.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
#include "base/callback_forward.h"
+#include "content/public/browser/download_id.h"
#include "net/base/net_errors.h"
namespace net {
@@ -35,12 +36,16 @@ class CONTENT_EXPORT ResourceDispatcherHost {
// dialog boxes.
virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0;
- // Initiates a download by explicit request of the renderer, e.g. due to
- // alt-clicking a link. If the download is started, |started_callback| will
- // be called on the UI thread with the DownloadItem; otherwise an error code
- // will be returned. |is_content_initiated| is used to indicate that the
- // request was generated from a web page, and hence may not be as trustworthy
- // as a browser generated request.
+ // Initiates a download by explicit request of the renderer (e.g. due to
+ // alt-clicking a link) or some other chrome subsystem.
+ // |is_content_initiated| is used to indicate that the request was generated
+ // from a web page, and hence may not be as trustworthy as a browser
+ // generated request. If |download_id| is invalid, a download id will be
+ // automatically assigned to the request, otherwise the specified download id
+ // will be used. (Note that this will result in re-use of an existing
+ // download item if the download id was already assigned.) If the download
+ // is started, |started_callback| will be called on the UI thread with the
+ // DownloadItem; otherwise an error code will be returned.
virtual net::Error BeginDownload(
scoped_ptr<net::URLRequest> request,
bool is_content_initiated,
@@ -49,6 +54,7 @@ class CONTENT_EXPORT ResourceDispatcherHost {
int route_id,
bool prefer_cache,
scoped_ptr<DownloadSaveInfo> save_info,
+ content::DownloadId download_id,
const DownloadStartedCallback& started_callback) = 0;
// Clears the ResourceDispatcherHostLoginDelegate associated with the request.
« no previous file with comments | « content/public/browser/download_url_parameters.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698