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

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

Issue 22794008: Remove deprecated functions that take StreamSockets instead of handles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android for reals Created 7 years, 4 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
« no previous file with comments | « net/socket/socks_client_socket_unittest.cc ('k') | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <openssl/bio.h> 10 #include <openssl/bio.h>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 virtual ~SSLClientSocketOpenSSLClientAuthTest() { 105 virtual ~SSLClientSocketOpenSSLClientAuthTest() {
106 key_store_->Flush(); 106 key_store_->Flush();
107 } 107 }
108 108
109 protected: 109 protected:
110 SSLClientSocket* CreateSSLClientSocket( 110 SSLClientSocket* CreateSSLClientSocket(
111 StreamSocket* transport_socket, 111 StreamSocket* transport_socket,
112 const HostPortPair& host_and_port, 112 const HostPortPair& host_and_port,
113 const SSLConfig& ssl_config) { 113 const SSLConfig& ssl_config) {
114 return socket_factory_->CreateSSLClientSocket(transport_socket, 114 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle);
115 connection->set_socket(transport_socket);
116 return socket_factory_->CreateSSLClientSocket(connection.release(),
115 host_and_port, 117 host_and_port,
116 ssl_config, 118 ssl_config,
117 context_); 119 context_);
118 } 120 }
119 121
120 // Connect to a HTTPS test server. 122 // Connect to a HTTPS test server.
121 bool ConnectToTestServer(SpawnedTestServer::SSLOptions& ssl_options) { 123 bool ConnectToTestServer(SpawnedTestServer::SSLOptions& ssl_options) {
122 test_server_.reset(new SpawnedTestServer(SpawnedTestServer::TYPE_HTTPS, 124 test_server_.reset(new SpawnedTestServer(SpawnedTestServer::TYPE_HTTPS,
123 ssl_options, 125 ssl_options,
124 base::FilePath())); 126 base::FilePath()));
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 EXPECT_TRUE(sock_->IsConnected()); 270 EXPECT_TRUE(sock_->IsConnected());
269 271
270 EXPECT_TRUE(CheckSSLClientSocketSentCert()); 272 EXPECT_TRUE(CheckSSLClientSocketSentCert());
271 273
272 sock_->Disconnect(); 274 sock_->Disconnect();
273 EXPECT_FALSE(sock_->IsConnected()); 275 EXPECT_FALSE(sock_->IsConnected());
274 } 276 }
275 277
276 } // namespace 278 } // namespace
277 } // namespace net 279 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_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