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

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: Fix browser test redness by ensuring that the ResourceDispatcherHostDelegate is notified in CreateR… 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();
svaldez 2016/08/19 17:05:14 Consider migrating or copying this comment to the
ananta 2016/08/19 19:02:14 Done.
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