| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #include "net/cert/ct_policy_enforcer.h" | 76 #include "net/cert/ct_policy_enforcer.h" |
| 77 #include "net/cert/ct_verifier.h" | 77 #include "net/cert/ct_verifier.h" |
| 78 #include "net/cert/multi_log_ct_verifier.h" | 78 #include "net/cert/multi_log_ct_verifier.h" |
| 79 #include "net/cert/multi_threaded_cert_verifier.h" | 79 #include "net/cert/multi_threaded_cert_verifier.h" |
| 80 #include "net/cert/sth_distributor.h" | 80 #include "net/cert/sth_distributor.h" |
| 81 #include "net/cert/sth_observer.h" | 81 #include "net/cert/sth_observer.h" |
| 82 #include "net/cookies/cookie_store.h" | 82 #include "net/cookies/cookie_store.h" |
| 83 #include "net/dns/host_cache.h" | 83 #include "net/dns/host_cache.h" |
| 84 #include "net/dns/host_resolver.h" | 84 #include "net/dns/host_resolver.h" |
| 85 #include "net/dns/mapped_host_resolver.h" | 85 #include "net/dns/mapped_host_resolver.h" |
| 86 #include "net/ftp/ftp_network_layer.h" | |
| 87 #include "net/http/http_auth_filter.h" | 86 #include "net/http/http_auth_filter.h" |
| 88 #include "net/http/http_auth_handler_factory.h" | 87 #include "net/http/http_auth_handler_factory.h" |
| 89 #include "net/http/http_auth_preferences.h" | 88 #include "net/http/http_auth_preferences.h" |
| 90 #include "net/http/http_network_layer.h" | 89 #include "net/http/http_network_layer.h" |
| 91 #include "net/http/http_server_properties_impl.h" | 90 #include "net/http/http_server_properties_impl.h" |
| 92 #include "net/nqe/external_estimate_provider.h" | 91 #include "net/nqe/external_estimate_provider.h" |
| 93 #include "net/nqe/network_quality_estimator.h" | 92 #include "net/nqe/network_quality_estimator.h" |
| 94 #include "net/proxy/proxy_config_service.h" | 93 #include "net/proxy/proxy_config_service.h" |
| 95 #include "net/proxy/proxy_script_fetcher_impl.h" | 94 #include "net/proxy/proxy_script_fetcher_impl.h" |
| 96 #include "net/proxy/proxy_service.h" | 95 #include "net/proxy/proxy_service.h" |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 | 1054 |
| 1056 job_factory->SetProtocolHandler(url::kDataScheme, | 1055 job_factory->SetProtocolHandler(url::kDataScheme, |
| 1057 base::MakeUnique<net::DataProtocolHandler>()); | 1056 base::MakeUnique<net::DataProtocolHandler>()); |
| 1058 job_factory->SetProtocolHandler( | 1057 job_factory->SetProtocolHandler( |
| 1059 url::kFileScheme, | 1058 url::kFileScheme, |
| 1060 base::MakeUnique<net::FileProtocolHandler>( | 1059 base::MakeUnique<net::FileProtocolHandler>( |
| 1061 content::BrowserThread::GetBlockingPool() | 1060 content::BrowserThread::GetBlockingPool() |
| 1062 ->GetTaskRunnerWithShutdownBehavior( | 1061 ->GetTaskRunnerWithShutdownBehavior( |
| 1063 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); | 1062 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); |
| 1064 #if !defined(DISABLE_FTP_SUPPORT) | 1063 #if !defined(DISABLE_FTP_SUPPORT) |
| 1065 globals->proxy_script_fetcher_ftp_transaction_factory.reset( | |
| 1066 new net::FtpNetworkLayer(globals->host_resolver.get())); | |
| 1067 job_factory->SetProtocolHandler( | 1064 job_factory->SetProtocolHandler( |
| 1068 url::kFtpScheme, | 1065 url::kFtpScheme, |
| 1069 base::MakeUnique<net::FtpProtocolHandler>( | 1066 net::FtpProtocolHandler::Create(globals->host_resolver.get())); |
| 1070 globals->proxy_script_fetcher_ftp_transaction_factory.get())); | |
| 1071 #endif | 1067 #endif |
| 1072 globals->proxy_script_fetcher_url_request_job_factory = | 1068 globals->proxy_script_fetcher_url_request_job_factory = |
| 1073 std::move(job_factory); | 1069 std::move(job_factory); |
| 1074 | 1070 |
| 1075 context->set_job_factory( | 1071 context->set_job_factory( |
| 1076 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1072 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1077 | 1073 |
| 1078 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1074 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1079 // system URLRequestContext too. There's no reason this should be tied to a | 1075 // system URLRequestContext too. There's no reason this should be tied to a |
| 1080 // profile. | 1076 // profile. |
| 1081 return context; | 1077 return context; |
| 1082 } | 1078 } |
| 1083 | 1079 |
| 1084 const metrics::UpdateUsagePrefCallbackType& | 1080 const metrics::UpdateUsagePrefCallbackType& |
| 1085 IOThread::GetMetricsDataUseForwarder() { | 1081 IOThread::GetMetricsDataUseForwarder() { |
| 1086 return metrics_data_use_forwarder_; | 1082 return metrics_data_use_forwarder_; |
| 1087 } | 1083 } |
| OLD | NEW |