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

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

Issue 3846005: Revert 62918 - net: clean up SSLHostInfo construction.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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/tcp_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_test_util.h » ('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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 else 786 else
787 result = DidEstablishConnection(); 787 result = DidEstablishConnection();
788 } else { 788 } else {
789 next_state_ = STATE_CLOSE; 789 next_state_ = STATE_CLOSE;
790 } 790 }
791 return result; 791 return result;
792 } 792 }
793 793
794 int SocketStream::DoSSLConnect() { 794 int SocketStream::DoSSLConnect() {
795 DCHECK(factory_); 795 DCHECK(factory_);
796 // TODO(agl): look into plumbing SSLHostInfo here.
797 socket_.reset(factory_->CreateSSLClientSocket( 796 socket_.reset(factory_->CreateSSLClientSocket(
798 socket_.release(), url_.HostNoBrackets(), ssl_config_, 797 socket_.release(), url_.HostNoBrackets(), ssl_config_));
799 NULL /* ssl_host_info */));
800 next_state_ = STATE_SSL_CONNECT_COMPLETE; 798 next_state_ = STATE_SSL_CONNECT_COMPLETE;
801 metrics_->OnSSLConnection(); 799 metrics_->OnSSLConnection();
802 return socket_->Connect(&io_callback_); 800 return socket_->Connect(&io_callback_);
803 } 801 }
804 802
805 int SocketStream::DoSSLConnectComplete(int result) { 803 int SocketStream::DoSSLConnectComplete(int result) {
806 if (IsCertificateError(result)) { 804 if (IsCertificateError(result)) {
807 if (socket_->IsConnectedAndIdle()) { 805 if (socket_->IsConnectedAndIdle()) {
808 result = HandleCertificateError(result); 806 result = HandleCertificateError(result);
809 } else { 807 } else {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 1017
1020 SSLConfigService* SocketStream::ssl_config_service() const { 1018 SSLConfigService* SocketStream::ssl_config_service() const {
1021 return context_->ssl_config_service(); 1019 return context_->ssl_config_service();
1022 } 1020 }
1023 1021
1024 ProxyService* SocketStream::proxy_service() const { 1022 ProxyService* SocketStream::proxy_service() const {
1025 return context_->proxy_service(); 1023 return context_->proxy_service();
1026 } 1024 }
1027 1025
1028 } // namespace net 1026 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698