Index: content/browser/loader/resource_dispatcher_host_impl.h |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h |
index f039aa13b1b9dc2e80ffd954a75f47e48951749c..cbb6e1192c2271b20a46aea416577db395be41d8 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.h |
+++ b/content/browser/loader/resource_dispatcher_host_impl.h |
@@ -24,6 +24,7 @@ |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "base/observer_list.h" |
+#include "base/single_thread_task_runner.h" |
#include "base/time/time.h" |
#include "content/browser/loader/global_routing_id.h" |
#include "content/browser/loader/resource_loader_delegate.h" |
@@ -91,7 +92,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// Work on moving creation of download handlers out of |
// ResourceDispatcherHostImpl. |
ResourceDispatcherHostImpl( |
- CreateDownloadHandlerIntercept download_handler_intercept); |
+ CreateDownloadHandlerIntercept download_handler_intercept, |
+ const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_runner); |
ResourceDispatcherHostImpl(); |
~ResourceDispatcherHostImpl() override; |
@@ -328,6 +330,14 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// methods in this file, which also tear down the loader. |
void CancelRequestFromRenderer(GlobalRequestID request_id); |
+ scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner() const { |
+ return io_thread_task_runner_; |
+ } |
+ |
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner() const { |
+ return main_thread_task_runner_; |
+ } |
+ |
private: |
friend class ResourceDispatcherHostTest; |
@@ -757,6 +767,12 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// Points to the registered download handler intercept. |
CreateDownloadHandlerIntercept create_download_handler_intercept_; |
+ // Task runner for the main thread. |
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
+ |
+ // Task runner for the IO thead. |
+ scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
}; |