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

Side by Side Diff: net/socket/ssl_client_socket_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
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 "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "net/base/address_list.h" 9 #include "net/base/address_list.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 cert_verifier_->set_default_result(net::OK); 507 cert_verifier_->set_default_result(net::OK);
508 context_.cert_verifier = cert_verifier_.get(); 508 context_.cert_verifier = cert_verifier_.get();
509 context_.transport_security_state = transport_security_state_.get(); 509 context_.transport_security_state = transport_security_state_.get();
510 } 510 }
511 511
512 protected: 512 protected:
513 net::SSLClientSocket* CreateSSLClientSocket( 513 net::SSLClientSocket* CreateSSLClientSocket(
514 net::StreamSocket* transport_socket, 514 net::StreamSocket* transport_socket,
515 const net::HostPortPair& host_and_port, 515 const net::HostPortPair& host_and_port,
516 const net::SSLConfig& ssl_config) { 516 const net::SSLConfig& ssl_config) {
517 return socket_factory_->CreateSSLClientSocket(transport_socket, 517 scoped_ptr<net::ClientSocketHandle> connection(new net::ClientSocketHandle);
518 connection->set_socket(transport_socket);
519 return socket_factory_->CreateSSLClientSocket(connection.release(),
518 host_and_port, 520 host_and_port,
519 ssl_config, 521 ssl_config,
520 context_); 522 context_);
521 } 523 }
522 524
523 net::ClientSocketFactory* socket_factory_; 525 net::ClientSocketFactory* socket_factory_;
524 scoped_ptr<net::MockCertVerifier> cert_verifier_; 526 scoped_ptr<net::MockCertVerifier> cert_verifier_;
525 scoped_ptr<net::TransportSecurityState> transport_security_state_; 527 scoped_ptr<net::TransportSecurityState> transport_security_state_;
526 net::SSLClientSocketContext context_; 528 net::SSLClientSocketContext context_;
527 }; 529 };
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 scoped_refptr<net::SSLCertRequestInfo> request_info = 1817 scoped_refptr<net::SSLCertRequestInfo> request_info =
1816 GetCertRequest(ssl_options); 1818 GetCertRequest(ssl_options);
1817 ASSERT_TRUE(request_info.get()); 1819 ASSERT_TRUE(request_info.get());
1818 ASSERT_EQ(2u, request_info->cert_authorities.size()); 1820 ASSERT_EQ(2u, request_info->cert_authorities.size());
1819 EXPECT_EQ(std::string(reinterpret_cast<const char*>(kThawteDN), kThawteLen), 1821 EXPECT_EQ(std::string(reinterpret_cast<const char*>(kThawteDN), kThawteLen),
1820 request_info->cert_authorities[0]); 1822 request_info->cert_authorities[0]);
1821 EXPECT_EQ( 1823 EXPECT_EQ(
1822 std::string(reinterpret_cast<const char*>(kDiginotarDN), kDiginotarLen), 1824 std::string(reinterpret_cast<const char*>(kDiginotarDN), kDiginotarLen),
1823 request_info->cert_authorities[1]); 1825 request_info->cert_authorities[1]);
1824 } 1826 }
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl_unittest.cc ('k') | net/socket/ssl_server_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698