| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_url_request_context_getter.h" | 5 #include "content/shell/browser/shell_url_request_context_getter.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ShellURLRequestContextGetter::ShellURLRequestContextGetter( | 67 ShellURLRequestContextGetter::ShellURLRequestContextGetter( |
| 68 bool ignore_certificate_errors, | 68 bool ignore_certificate_errors, |
| 69 const base::FilePath& base_path, | 69 const base::FilePath& base_path, |
| 70 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 70 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 71 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, | 71 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
| 72 ProtocolHandlerMap* protocol_handlers, | 72 ProtocolHandlerMap* protocol_handlers, |
| 73 URLRequestInterceptorScopedVector request_interceptors, | 73 URLRequestInterceptorScopedVector request_interceptors, |
| 74 net::NetLog* net_log) | 74 net::NetLog* net_log) |
| 75 : ignore_certificate_errors_(ignore_certificate_errors), | 75 : ignore_certificate_errors_(ignore_certificate_errors), |
| 76 base_path_(base_path), | 76 base_path_(base_path), |
| 77 io_task_runner_(io_task_runner), | 77 io_task_runner_(std::move(io_task_runner)), |
| 78 file_task_runner_(file_task_runner), | 78 file_task_runner_(std::move(file_task_runner)), |
| 79 net_log_(net_log), | 79 net_log_(net_log), |
| 80 request_interceptors_(std::move(request_interceptors)) { | 80 request_interceptors_(std::move(request_interceptors)) { |
| 81 // Must first be created on the UI thread. | 81 // Must first be created on the UI thread. |
| 82 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 82 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 83 | 83 |
| 84 std::swap(protocol_handlers_, *protocol_handlers); | 84 std::swap(protocol_handlers_, *protocol_handlers); |
| 85 | 85 |
| 86 // We must create the proxy config service on the UI loop on Linux because it | 86 // We must create the proxy config service on the UI loop on Linux because it |
| 87 // must synchronously run on the glib message loop. This will be passed to | 87 // must synchronously run on the glib message loop. This will be passed to |
| 88 // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). | 88 // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 scoped_refptr<base::SingleThreadTaskRunner> | 248 scoped_refptr<base::SingleThreadTaskRunner> |
| 249 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { | 249 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { |
| 250 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 250 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
| 251 } | 251 } |
| 252 | 252 |
| 253 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { | 253 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { |
| 254 return url_request_context_->host_resolver(); | 254 return url_request_context_->host_resolver(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace content | 257 } // namespace content |
| OLD | NEW |