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

Unified Diff: content/browser/download/download_resource_handler.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
Index: content/browser/download/download_resource_handler.h
diff --git a/content/browser/download/download_resource_handler.h b/content/browser/download/download_resource_handler.h
index 92663589910fad3df31db8ef1821cacf37c7549e..084e4b3fd6d50648710daff42d23a3537b3e2ab3 100644
--- a/content/browser/download/download_resource_handler.h
+++ b/content/browser/download/download_resource_handler.h
@@ -42,6 +42,16 @@ class CONTENT_EXPORT DownloadResourceHandler
// |id| should be invalid if the id should be automatically assigned.
DownloadResourceHandler(net::URLRequest* request);
+ // static
+ // This function is passed into ResourceDispatcherHostImpl during its
+ // creation and is used to create instances of DownloadResourceHandler as
+ // needed.
+ // TODO(ananta)
+ // Find a better way to achieve this. Ideally we want to move the logic of
+ // creating DownloadResourceHandler instances out of
+ // ResourceDispatcherHostImpl.
+ static std::unique_ptr<ResourceHandler> Create(net::URLRequest* request);
+
bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
ResourceResponse* response,
bool* defer) override;
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698