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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2785523002: Reduce/remove usage of BrowserThread in content/browser/loader. (Closed)
Patch Set: Fix unittests redness Created 3 years, 9 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 ba276a6acc07aa22fcc09a95cd89497fa8814223..d77edf75c5bfd64043222ff5d36f7ec3f3a49938 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1487,8 +1487,13 @@ int BrowserMainLoop::BrowserThreadsStarted() {
// 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.
+ // We pass the task runners for the UI and IO threads as a stopgap approach
+ // for now. Eventually variants of these runners would be available in the
+ // network service.
resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl(
- base::Bind(&DownloadResourceHandler::Create)));
+ base::Bind(&DownloadResourceHandler::Create),
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)));
GetContentClient()->browser()->ResourceDispatcherHostCreated();
loader_delegate_.reset(new LoaderDelegateImpl());

Powered by Google App Engine
This is Rietveld 408576698