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

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: Initialize tab_info_ in OnStart instead of OnResponseStart because we need a central place where al… 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/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 7d2eaa5755a987b141094ab619d33f4f241b8996..e2cd7c163658cf4b481c576726fa6242c70a6468 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_manager_impl.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"
@@ -1288,6 +1289,12 @@ int BrowserMainLoop::BrowserThreadsStarted() {
"BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost");
resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl());
GetContentClient()->browser()->ResourceDispatcherHostCreated();
+ // 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.
+ DownloadManagerImpl::ResourceDispatcherHostCreated();
Randy Smith (Not in Mondays) 2016/08/21 23:32:57 I have a slight preference for this reference bein
Randy Smith (Not in Mondays) 2016/08/21 23:32:57 Why not change the RDHI constructor rather than re
ananta 2016/08/22 19:14:57 This is a temporary change to get us to the end go
Randy Smith (Not in Mondays) 2016/08/23 19:54:45 I'm not sure we're communicating; would you maybe
loader_delegate_.reset(new LoaderDelegateImpl());
resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get());
« no previous file with comments | « no previous file | content/browser/download/download_manager_impl.h » ('j') | content/browser/download/download_resource_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698