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

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

Issue 2251643003: Remove the BeginSaveFile and BeginDownload methods from ResourceDispatcherHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address next round of review comments and keep the download test in resource_dispatcher_host_unitteā€¦ Created 4 years, 4 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/browser/browser_main_loop.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*>;
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698