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

Side by Side Diff: net/spdy/spdy_session.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_stream/socket_stream.cc ('k') | remoting/jingle_glue/ssl_socket_adapter.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 #include "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/linked_ptr.h" 8 #include "base/linked_ptr.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 513
514 AdjustSocketBufferSizes(connection_->socket()); 514 AdjustSocketBufferSizes(connection_->socket());
515 515
516 if (use_ssl_) { 516 if (use_ssl_) {
517 // Add a SSL socket on top of our existing transport socket. 517 // Add a SSL socket on top of our existing transport socket.
518 ClientSocket* socket = connection_->release_socket(); 518 ClientSocket* socket = connection_->release_socket();
519 // TODO(mbelshe): Fix the hostname. This is BROKEN without having 519 // TODO(mbelshe): Fix the hostname. This is BROKEN without having
520 // a real hostname. 520 // a real hostname.
521 socket = session_->socket_factory()->CreateSSLClientSocket( 521 socket = session_->socket_factory()->CreateSSLClientSocket(
522 socket, "" /* request_->url.HostNoBrackets() */ , ssl_config_); 522 socket, HostPortPair("", 0) /* request_->url.HostNoBrackets() */ ,
523 ssl_config_);
523 connection_->set_socket(socket); 524 connection_->set_socket(socket);
524 is_secure_ = true; 525 is_secure_ = true;
525 int status = connection_->socket()->Connect(&ssl_connect_callback_); 526 int status = connection_->socket()->Connect(&ssl_connect_callback_);
526 if (status != ERR_IO_PENDING) 527 if (status != ERR_IO_PENDING)
527 OnSSLConnect(status); 528 OnSSLConnect(status);
528 } else { 529 } else {
529 DCHECK_EQ(state_, CONNECTING); 530 DCHECK_EQ(state_, CONNECTING);
530 state_ = CONNECTED; 531 state_ = CONNECTED;
531 532
532 // Make sure we get any pending data sent. 533 // Make sure we get any pending data sent.
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsRetransRate", 1305 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsRetransRate",
1305 setting.second, 1306 setting.second,
1306 1, 100, 50); 1307 1, 100, 50);
1307 break; 1308 break;
1308 } 1309 }
1309 } 1310 }
1310 } 1311 }
1311 } 1312 }
1312 1313
1313 } // namespace net 1314 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | remoting/jingle_glue/ssl_socket_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698