Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: net/socket/ssl_client_socket_pool_unittest.cc

Issue 16501002: Give more request types a TransportSecurityState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enforce CalledOnValidThread in all non-static methods. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 HttpAuth::AUTH_SCHEME_BASIC, 174 HttpAuth::AUTH_SCHEME_BASIC,
175 "Basic realm=MyRealm1", 175 "Basic realm=MyRealm1",
176 AuthCredentials(kFoo, kBar), 176 AuthCredentials(kFoo, kBar),
177 "/"); 177 "/");
178 } 178 }
179 179
180 HttpNetworkSession* CreateNetworkSession() { 180 HttpNetworkSession* CreateNetworkSession() {
181 HttpNetworkSession::Params params; 181 HttpNetworkSession::Params params;
182 params.host_resolver = &host_resolver_; 182 params.host_resolver = &host_resolver_;
183 params.cert_verifier = cert_verifier_.get(); 183 params.cert_verifier = cert_verifier_.get();
184 params.transport_security_state = transport_security_state_.get();
184 params.proxy_service = proxy_service_.get(); 185 params.proxy_service = proxy_service_.get();
185 params.client_socket_factory = &socket_factory_; 186 params.client_socket_factory = &socket_factory_;
186 params.ssl_config_service = ssl_config_service_.get(); 187 params.ssl_config_service = ssl_config_service_.get();
187 params.http_auth_handler_factory = http_auth_handler_factory_.get(); 188 params.http_auth_handler_factory = http_auth_handler_factory_.get();
188 params.http_server_properties = &http_server_properties_; 189 params.http_server_properties = &http_server_properties_;
189 params.enable_spdy_compression = false; 190 params.enable_spdy_compression = false;
190 return new HttpNetworkSession(params); 191 return new HttpNetworkSession(params);
191 } 192 }
192 193
193 void TestIPPoolingDisabled(SSLSocketDataProvider* ssl); 194 void TestIPPoolingDisabled(SSLSocketDataProvider* ssl);
194 195
195 MockClientSocketFactory socket_factory_; 196 MockClientSocketFactory socket_factory_;
196 MockCachingHostResolver host_resolver_; 197 MockCachingHostResolver host_resolver_;
197 scoped_ptr<CertVerifier> cert_verifier_; 198 scoped_ptr<CertVerifier> cert_verifier_;
199 scoped_ptr<TransportSecurityState> transport_security_state_;
198 const scoped_ptr<ProxyService> proxy_service_; 200 const scoped_ptr<ProxyService> proxy_service_;
199 const scoped_refptr<SSLConfigService> ssl_config_service_; 201 const scoped_refptr<SSLConfigService> ssl_config_service_;
200 const scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; 202 const scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
201 HttpServerPropertiesImpl http_server_properties_; 203 HttpServerPropertiesImpl http_server_properties_;
202 const scoped_refptr<HttpNetworkSession> session_; 204 const scoped_refptr<HttpNetworkSession> session_;
203 205
204 scoped_refptr<TransportSocketParams> direct_transport_socket_params_; 206 scoped_refptr<TransportSocketParams> direct_transport_socket_params_;
205 ClientSocketPoolHistograms transport_histograms_; 207 ClientSocketPoolHistograms transport_histograms_;
206 MockTransportClientSocketPool transport_socket_pool_; 208 MockTransportClientSocketPool transport_socket_pool_;
207 209
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 ssl.channel_id_sent = true; 896 ssl.channel_id_sent = true;
895 ssl.SetNextProto(kProtoSPDY2); 897 ssl.SetNextProto(kProtoSPDY2);
896 TestIPPoolingDisabled(&ssl); 898 TestIPPoolingDisabled(&ssl);
897 } 899 }
898 900
899 // It would be nice to also test the timeouts in SSLClientSocketPool. 901 // It would be nice to also test the timeouts in SSLClientSocketPool.
900 902
901 } // namespace 903 } // namespace
902 904
903 } // namespace net 905 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl_unittest.cc ('k') | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698