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 "net/http/http_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 const base::string16 kBar(base::ASCIIToUTF16("bar")); | 160 const base::string16 kBar(base::ASCIIToUTF16("bar")); |
161 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), | 161 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), |
162 "MyRealm1", | 162 "MyRealm1", |
163 HttpAuth::AUTH_SCHEME_BASIC, | 163 HttpAuth::AUTH_SCHEME_BASIC, |
164 "Basic realm=MyRealm1", | 164 "Basic realm=MyRealm1", |
165 AuthCredentials(kFoo, kBar), | 165 AuthCredentials(kFoo, kBar), |
166 "/"); | 166 "/"); |
167 } | 167 } |
168 | 168 |
169 HttpNetworkSession* CreateNetworkSession() { | 169 HttpNetworkSession* CreateNetworkSession() { |
170 HttpNetworkSession::Params params; | 170 HttpNetworkSession::Context session_context; |
171 params.host_resolver = &host_resolver_; | 171 session_context.host_resolver = &host_resolver_; |
172 params.cert_verifier = cert_verifier_.get(); | 172 session_context.cert_verifier = cert_verifier_.get(); |
173 params.transport_security_state = transport_security_state_.get(); | 173 session_context.transport_security_state = transport_security_state_.get(); |
174 params.cert_transparency_verifier = &ct_verifier_; | 174 session_context.cert_transparency_verifier = &ct_verifier_; |
175 params.ct_policy_enforcer = &ct_policy_enforcer_; | 175 session_context.ct_policy_enforcer = &ct_policy_enforcer_; |
176 params.proxy_service = proxy_service_.get(); | 176 session_context.proxy_service = proxy_service_.get(); |
177 params.client_socket_factory = &socket_factory_; | 177 session_context.client_socket_factory = &socket_factory_; |
178 params.ssl_config_service = ssl_config_service_.get(); | 178 session_context.ssl_config_service = ssl_config_service_.get(); |
179 params.http_auth_handler_factory = http_auth_handler_factory_.get(); | 179 session_context.http_auth_handler_factory = |
180 params.http_server_properties = http_server_properties_.get(); | 180 http_auth_handler_factory_.get(); |
181 return new HttpNetworkSession(params); | 181 session_context.http_server_properties = http_server_properties_.get(); |
| 182 return new HttpNetworkSession(HttpNetworkSession::Params(), |
| 183 session_context); |
182 } | 184 } |
183 | 185 |
184 void TestIPPoolingDisabled(SSLSocketDataProvider* ssl); | 186 void TestIPPoolingDisabled(SSLSocketDataProvider* ssl); |
185 | 187 |
186 MockClientSocketFactory socket_factory_; | 188 MockClientSocketFactory socket_factory_; |
187 MockCachingHostResolver host_resolver_; | 189 MockCachingHostResolver host_resolver_; |
188 std::unique_ptr<CertVerifier> cert_verifier_; | 190 std::unique_ptr<CertVerifier> cert_verifier_; |
189 std::unique_ptr<TransportSecurityState> transport_security_state_; | 191 std::unique_ptr<TransportSecurityState> transport_security_state_; |
190 MultiLogCTVerifier ct_verifier_; | 192 MultiLogCTVerifier ct_verifier_; |
191 CTPolicyEnforcer ct_policy_enforcer_; | 193 CTPolicyEnforcer ct_policy_enforcer_; |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 ssl.channel_id_sent = true; | 937 ssl.channel_id_sent = true; |
936 ssl.next_proto = kProtoHTTP2; | 938 ssl.next_proto = kProtoHTTP2; |
937 TestIPPoolingDisabled(&ssl); | 939 TestIPPoolingDisabled(&ssl); |
938 } | 940 } |
939 | 941 |
940 // It would be nice to also test the timeouts in SSLClientSocketPool. | 942 // It would be nice to also test the timeouts in SSLClientSocketPool. |
941 | 943 |
942 } // namespace | 944 } // namespace |
943 | 945 |
944 } // namespace net | 946 } // namespace net |
OLD | NEW |