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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 22795006: Remove WorkerPool dependency from URLRequestFileJob. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android include Created 7 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: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 540dfc1082bd81c127f69468b7666235c5f60891..bbeb6d954bf41352cc89580e8ea6b4a7a269a5cf 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -184,13 +184,17 @@ URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams()
URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams()
{}
-URLRequestContextBuilder::URLRequestContextBuilder()
+URLRequestContextBuilder::URLRequestContextBuilder(
+ const scoped_refptr<base::TaskRunner>& task_runner)
akalin 2013/08/15 17:43:05 don't think you need this parameter -- see context
: data_enabled_(false),
file_enabled_(false),
#if !defined(DISABLE_FTP_SUPPORT)
ftp_enabled_(false),
#endif
- http_cache_enabled_(true) {}
+ http_cache_enabled_(true),
+ task_runner_(task_runner) {
+}
+
URLRequestContextBuilder::~URLRequestContextBuilder() {}
#if defined(OS_LINUX) || defined(OS_ANDROID)
@@ -301,7 +305,8 @@ URLRequestContext* URLRequestContextBuilder::Build() {
if (data_enabled_)
job_factory->SetProtocolHandler("data", new DataProtocolHandler);
if (file_enabled_)
- job_factory->SetProtocolHandler("file", new FileProtocolHandler);
+ job_factory->SetProtocolHandler("file",
+ new FileProtocolHandler(task_runner_));
#if !defined(DISABLE_FTP_SUPPORT)
if (ftp_enabled_) {
ftp_transaction_factory_.reset(

Powered by Google App Engine
This is Rietveld 408576698