| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |