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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 | 1074 |
1075 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( | 1075 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( |
1076 new net::URLRequestJobFactoryImpl()); | 1076 new net::URLRequestJobFactoryImpl()); |
1077 | 1077 |
1078 job_factory->SetProtocolHandler(url::kDataScheme, | 1078 job_factory->SetProtocolHandler(url::kDataScheme, |
1079 base::MakeUnique<net::DataProtocolHandler>()); | 1079 base::MakeUnique<net::DataProtocolHandler>()); |
1080 job_factory->SetProtocolHandler( | 1080 job_factory->SetProtocolHandler( |
1081 url::kFileScheme, | 1081 url::kFileScheme, |
1082 base::MakeUnique<net::FileProtocolHandler>( | 1082 base::MakeUnique<net::FileProtocolHandler>( |
1083 base::CreateTaskRunnerWithTraits( | 1083 base::CreateTaskRunnerWithTraits( |
1084 base::TaskTraits() | 1084 {base::MayBlock(), base::TaskPriority::USER_VISIBLE, |
1085 .MayBlock() | 1085 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}))); |
1086 .WithPriority(base::TaskPriority::USER_VISIBLE) | |
1087 .WithShutdownBehavior( | |
1088 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))); | |
1089 #if !BUILDFLAG(DISABLE_FTP_SUPPORT) | 1086 #if !BUILDFLAG(DISABLE_FTP_SUPPORT) |
1090 job_factory->SetProtocolHandler( | 1087 job_factory->SetProtocolHandler( |
1091 url::kFtpScheme, | 1088 url::kFtpScheme, |
1092 net::FtpProtocolHandler::Create(globals->host_resolver.get())); | 1089 net::FtpProtocolHandler::Create(globals->host_resolver.get())); |
1093 #endif | 1090 #endif |
1094 globals->proxy_script_fetcher_url_request_job_factory = | 1091 globals->proxy_script_fetcher_url_request_job_factory = |
1095 std::move(job_factory); | 1092 std::move(job_factory); |
1096 | 1093 |
1097 context->set_job_factory( | 1094 context->set_job_factory( |
1098 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1095 globals->proxy_script_fetcher_url_request_job_factory.get()); |
1099 | 1096 |
1100 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1097 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1101 // system URLRequestContext too. There's no reason this should be tied to a | 1098 // system URLRequestContext too. There's no reason this should be tied to a |
1102 // profile. | 1099 // profile. |
1103 return context; | 1100 return context; |
1104 } | 1101 } |
1105 | 1102 |
1106 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { | 1103 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { |
1107 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); | 1104 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); |
1108 } | 1105 } |
OLD | NEW |