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

Side by Side Diff: net/socket_stream/socket_stream.cc

Issue 3174004: Pass both hostname and port into SSLClientSocket (Closed)
Patch Set: Created 10 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
« no previous file with comments | « net/socket/ssl_client_socket_win.cc ('k') | net/spdy/spdy_session.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should
6 // think about ways to share code, if possible. 6 // think about ways to share code, if possible.
7 7
8 #include "net/socket_stream/socket_stream.h" 8 #include "net/socket_stream/socket_stream.h"
9 9
10 #include <set> 10 #include <set>
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 result = DidEstablishConnection(); 790 result = DidEstablishConnection();
791 } else { 791 } else {
792 next_state_ = STATE_CLOSE; 792 next_state_ = STATE_CLOSE;
793 } 793 }
794 return result; 794 return result;
795 } 795 }
796 796
797 int SocketStream::DoSSLConnect() { 797 int SocketStream::DoSSLConnect() {
798 DCHECK(factory_); 798 DCHECK(factory_);
799 socket_.reset(factory_->CreateSSLClientSocket( 799 socket_.reset(factory_->CreateSSLClientSocket(
800 socket_.release(), url_.HostNoBrackets(), ssl_config_)); 800 socket_.release(),
801 HostPortPair(url_.HostNoBrackets(), url_.EffectiveIntPort()),
802 ssl_config_));
801 next_state_ = STATE_SSL_CONNECT_COMPLETE; 803 next_state_ = STATE_SSL_CONNECT_COMPLETE;
802 metrics_->OnSSLConnection(); 804 metrics_->OnSSLConnection();
803 return socket_->Connect(&io_callback_); 805 return socket_->Connect(&io_callback_);
804 } 806 }
805 807
806 int SocketStream::DoSSLConnectComplete(int result) { 808 int SocketStream::DoSSLConnectComplete(int result) {
807 if (IsCertificateError(result)) { 809 if (IsCertificateError(result)) {
808 if (socket_->IsConnectedAndIdle()) { 810 if (socket_->IsConnectedAndIdle()) {
809 result = HandleCertificateError(result); 811 result = HandleCertificateError(result);
810 } else { 812 } else {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 1021
1020 SSLConfigService* SocketStream::ssl_config_service() const { 1022 SSLConfigService* SocketStream::ssl_config_service() const {
1021 return context_->ssl_config_service(); 1023 return context_->ssl_config_service();
1022 } 1024 }
1023 1025
1024 ProxyService* SocketStream::proxy_service() const { 1026 ProxyService* SocketStream::proxy_service() const {
1025 return context_->proxy_service(); 1027 return context_->proxy_service();
1026 } 1028 }
1027 1029
1028 } // namespace net 1030 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698