| 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/layout_test/layout_test_url_request_context_gett
er.h" | 5 #include "content/shell/browser/layout_test/layout_test_url_request_context_gett
er.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 10 #include "base/logging.h" |
| 9 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 10 #include "content/shell/browser/shell_network_delegate.h" | 12 #include "content/shell/browser/shell_network_delegate.h" |
| 11 #include "net/proxy/proxy_service.h" | 13 #include "net/proxy/proxy_service.h" |
| 12 | 14 |
| 13 namespace content { | 15 namespace content { |
| 14 | 16 |
| 15 LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter( | 17 LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter( |
| 16 bool ignore_certificate_errors, | 18 bool ignore_certificate_errors, |
| 17 const base::FilePath& base_path, | 19 const base::FilePath& base_path, |
| 18 base::MessageLoop* io_loop, | 20 base::MessageLoop* io_loop, |
| 19 base::MessageLoop* file_loop, | 21 base::MessageLoop* file_loop, |
| 20 ProtocolHandlerMap* protocol_handlers, | 22 ProtocolHandlerMap* protocol_handlers, |
| 21 URLRequestInterceptorScopedVector request_interceptors, | 23 URLRequestInterceptorScopedVector request_interceptors, |
| 22 net::NetLog* net_log) | 24 net::NetLog* net_log) |
| 23 : ShellURLRequestContextGetter(ignore_certificate_errors, | 25 : ShellURLRequestContextGetter(ignore_certificate_errors, |
| 24 base_path, | 26 base_path, |
| 25 io_loop, | 27 io_loop, |
| 26 file_loop, | 28 file_loop, |
| 27 protocol_handlers, | 29 protocol_handlers, |
| 28 request_interceptors.Pass(), | 30 std::move(request_interceptors), |
| 29 net_log) { | 31 net_log) { |
| 30 // Must first be created on the UI thread. | 32 // Must first be created on the UI thread. |
| 31 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 33 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 32 } | 34 } |
| 33 | 35 |
| 34 LayoutTestURLRequestContextGetter::~LayoutTestURLRequestContextGetter() { | 36 LayoutTestURLRequestContextGetter::~LayoutTestURLRequestContextGetter() { |
| 35 } | 37 } |
| 36 | 38 |
| 37 scoped_ptr<net::NetworkDelegate> | 39 scoped_ptr<net::NetworkDelegate> |
| 38 LayoutTestURLRequestContextGetter::CreateNetworkDelegate() { | 40 LayoutTestURLRequestContextGetter::CreateNetworkDelegate() { |
| 39 ShellNetworkDelegate::SetAcceptAllCookies(false); | 41 ShellNetworkDelegate::SetAcceptAllCookies(false); |
| 40 return make_scoped_ptr(new ShellNetworkDelegate); | 42 return make_scoped_ptr(new ShellNetworkDelegate); |
| 41 } | 43 } |
| 42 | 44 |
| 43 scoped_ptr<net::ProxyConfigService> | 45 scoped_ptr<net::ProxyConfigService> |
| 44 LayoutTestURLRequestContextGetter::GetProxyConfigService() { | 46 LayoutTestURLRequestContextGetter::GetProxyConfigService() { |
| 45 return nullptr; | 47 return nullptr; |
| 46 } | 48 } |
| 47 | 49 |
| 48 scoped_ptr<net::ProxyService> | 50 scoped_ptr<net::ProxyService> |
| 49 LayoutTestURLRequestContextGetter::GetProxyService() { | 51 LayoutTestURLRequestContextGetter::GetProxyService() { |
| 50 return net::ProxyService::CreateDirect(); | 52 return net::ProxyService::CreateDirect(); |
| 51 } | 53 } |
| 52 | 54 |
| 53 } // namespace content | 55 } // namespace content |
| OLD | NEW |