OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
11 #include "net/base/cert_verifier.h" | |
12 #include "net/base/cookie_monster.h" | 11 #include "net/base/cookie_monster.h" |
13 #include "net/base/default_origin_bound_cert_store.h" | 12 #include "net/base/default_origin_bound_cert_store.h" |
14 #include "net/base/host_resolver.h" | 13 #include "net/base/host_resolver.h" |
| 14 #include "net/base/multi_threaded_cert_verifier.h" |
15 #include "net/base/origin_bound_cert_service.h" | 15 #include "net/base/origin_bound_cert_service.h" |
16 #include "net/base/ssl_config_service_defaults.h" | 16 #include "net/base/ssl_config_service_defaults.h" |
17 #include "net/ftp/ftp_network_layer.h" | 17 #include "net/ftp/ftp_network_layer.h" |
18 #include "net/http/http_auth_handler_factory.h" | 18 #include "net/http/http_auth_handler_factory.h" |
19 #include "net/http/http_server_properties_impl.h" | 19 #include "net/http/http_server_properties_impl.h" |
20 #include "net/proxy/proxy_config_service.h" | 20 #include "net/proxy/proxy_config_service.h" |
21 #include "net/proxy/proxy_config_service_fixed.h" | 21 #include "net/proxy/proxy_config_service_fixed.h" |
22 #include "net/proxy/proxy_service.h" | 22 #include "net/proxy/proxy_service.h" |
23 #include "net/url_request/url_request_job_factory.h" | 23 #include "net/url_request/url_request_job_factory.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #else | 70 #else |
71 // Use the system proxy settings. | 71 // Use the system proxy settings. |
72 scoped_ptr<net::ProxyConfigService> proxy_config_service( | 72 scoped_ptr<net::ProxyConfigService> proxy_config_service( |
73 net::ProxyService::CreateSystemProxyConfigService( | 73 net::ProxyService::CreateSystemProxyConfigService( |
74 MessageLoop::current(), NULL)); | 74 MessageLoop::current(), NULL)); |
75 #endif | 75 #endif |
76 storage_.set_host_resolver( | 76 storage_.set_host_resolver( |
77 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 77 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, |
78 net::HostResolver::kDefaultRetryAttempts, | 78 net::HostResolver::kDefaultRetryAttempts, |
79 NULL)); | 79 NULL)); |
80 storage_.set_cert_verifier(new net::CertVerifier); | 80 storage_.set_cert_verifier(new net::MultiThreadedCertVerifier); |
81 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( | 81 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( |
82 proxy_config_service.release(), 0, NULL)); | 82 proxy_config_service.release(), 0, NULL)); |
83 storage_.set_ssl_config_service( | 83 storage_.set_ssl_config_service( |
84 new net::SSLConfigServiceDefaults); | 84 new net::SSLConfigServiceDefaults); |
85 | 85 |
86 storage_.set_http_auth_handler_factory( | 86 storage_.set_http_auth_handler_factory( |
87 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); | 87 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); |
88 storage_.set_http_server_properties( | 88 storage_.set_http_server_properties( |
89 new net::HttpServerPropertiesImpl); | 89 new net::HttpServerPropertiesImpl); |
90 | 90 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 storage_.set_job_factory(job_factory); | 130 storage_.set_job_factory(job_factory); |
131 } | 131 } |
132 | 132 |
133 TestShellRequestContext::~TestShellRequestContext() { | 133 TestShellRequestContext::~TestShellRequestContext() { |
134 } | 134 } |
135 | 135 |
136 const std::string& TestShellRequestContext::GetUserAgent( | 136 const std::string& TestShellRequestContext::GetUserAgent( |
137 const GURL& url) const { | 137 const GURL& url) const { |
138 return webkit_glue::GetUserAgent(url); | 138 return webkit_glue::GetUserAgent(url); |
139 } | 139 } |
OLD | NEW |