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

Unified Diff: content/browser/browser_main_loop.cc

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 | « no previous file | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 309e4eb4e5e5b5e14bfe5361916cab4e875f1020..d276730f863f783c7bd62eab9886bee5242587a8 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -45,6 +45,7 @@
#include "content/browser/browser_thread_impl.h"
#include "content/browser/device_sensors/device_sensor_service.h"
#include "content/browser/dom_storage/dom_storage_area.h"
+#include "content/browser/download/download_resource_handler.h"
#include "content/browser/download/save_file_manager.h"
#include "content/browser/gamepad/gamepad_service.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
@@ -1280,7 +1281,13 @@ int BrowserMainLoop::BrowserThreadsStarted() {
{
TRACE_EVENT0("startup",
"BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost");
- resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl());
+ // TODO(ananta)
+ // We register an interceptor on the ResourceDispatcherHostImpl instance to
+ // intercept requests to create handlers for download requests. We need to
+ // find a better way to achieve this. Ideally we don't want knowledge of
+ // downloads in ResourceDispatcherHostImpl.
+ resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl(
+ base::Bind(&DownloadResourceHandler::Create)));
GetContentClient()->browser()->ResourceDispatcherHostCreated();
loader_delegate_.reset(new LoaderDelegateImpl());
« no previous file with comments | « no previous file | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698