| 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 "webkit/tools/test_shell/test_shell_request_context.h" | 5 #include "webkit/tools/test_shell/test_shell_request_context.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // issues. | 70 // issues. |
| 71 // TODO(port): rename "linux" to some nonspecific unix. | 71 // TODO(port): rename "linux" to some nonspecific unix. |
| 72 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 72 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
| 73 new net::ProxyConfigServiceFixed(net::ProxyConfig())); | 73 new net::ProxyConfigServiceFixed(net::ProxyConfig())); |
| 74 #else | 74 #else |
| 75 // Use the system proxy settings. | 75 // Use the system proxy settings. |
| 76 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 76 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
| 77 net::ProxyService::CreateSystemProxyConfigService( | 77 net::ProxyService::CreateSystemProxyConfigService( |
| 78 base::ThreadTaskRunnerHandle::Get(), NULL)); | 78 base::ThreadTaskRunnerHandle::Get(), NULL)); |
| 79 #endif | 79 #endif |
| 80 storage_.set_host_resolver( | 80 storage_.set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL)); |
| 81 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | |
| 82 net::HostResolver::kDefaultRetryAttempts, | |
| 83 NULL)); | |
| 84 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); | 81 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); |
| 85 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( | 82 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
| 86 proxy_config_service.release(), 0, NULL)); | 83 proxy_config_service.release(), 0, NULL)); |
| 87 storage_.set_ssl_config_service( | 84 storage_.set_ssl_config_service( |
| 88 new net::SSLConfigServiceDefaults); | 85 new net::SSLConfigServiceDefaults); |
| 89 | 86 |
| 90 storage_.set_http_auth_handler_factory( | 87 storage_.set_http_auth_handler_factory( |
| 91 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 88 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
| 92 storage_.set_http_server_properties( | 89 storage_.set_http_server_properties( |
| 93 new net::HttpServerPropertiesImpl); | 90 new net::HttpServerPropertiesImpl); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 storage_.set_job_factory(job_factory); | 130 storage_.set_job_factory(job_factory); |
| 134 } | 131 } |
| 135 | 132 |
| 136 TestShellRequestContext::~TestShellRequestContext() { | 133 TestShellRequestContext::~TestShellRequestContext() { |
| 137 } | 134 } |
| 138 | 135 |
| 139 const std::string& TestShellRequestContext::GetUserAgent( | 136 const std::string& TestShellRequestContext::GetUserAgent( |
| 140 const GURL& url) const { | 137 const GURL& url) const { |
| 141 return webkit_glue::GetUserAgent(url); | 138 return webkit_glue::GetUserAgent(url); |
| 142 } | 139 } |
| OLD | NEW |