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 9320bdff6e445ed18e2830cbdb04916075df5703..6f4adbedbafdbde6157aec1bc48f1b271658a087 100644 |
--- a/content/browser/download/download_manager_impl.h |
+++ b/content/browser/download/download_manager_impl.h |
@@ -37,6 +37,7 @@ class DownloadFileFactory; |
class DownloadItemFactory; |
class DownloadItemImpl; |
class DownloadRequestHandleInterface; |
+class ResourceContext; |
class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, |
private DownloadItemImplDelegate { |
@@ -120,6 +121,21 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, |
void RemoveUrlDownloader(UrlDownloader* downloader); |
+ // Helper function to initiate a download request. This function initiates |
+ // the download using functionality provided by the |
+ // ResourceDispatcherHostImpl::BeginURLRequest function. The function returns |
+ // the result of the downoad operation. Please see the |
+ // DownloadInterruptReason enum for information on possible return values. |
+ static DownloadInterruptReason BeginDownloadRequest( |
+ std::unique_ptr<net::URLRequest> url_request, |
+ const Referrer& referrer, |
+ ResourceContext* resource_context, |
+ bool is_content_initiated, |
+ int render_process_id, |
+ int render_view_route_id, |
+ int render_frame_route_id, |
+ bool do_not_prompt_for_login); |
+ |
private: |
using DownloadSet = std::set<DownloadItem*>; |
using DownloadMap = std::unordered_map<uint32_t, DownloadItemImpl*>; |