| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/flip/flip_session.h" | 5 #include "net/flip/flip_session.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 connection_.socket()->SetSendBufferSize(kSocketBufferSize); | 298 connection_.socket()->SetSendBufferSize(kSocketBufferSize); |
| 299 | 299 |
| 300 if (use_ssl_) { | 300 if (use_ssl_) { |
| 301 // Add a SSL socket on top of our existing transport socket. | 301 // Add a SSL socket on top of our existing transport socket. |
| 302 ClientSocket* socket = connection_.release_socket(); | 302 ClientSocket* socket = connection_.release_socket(); |
| 303 // TODO(mbelshe): Fix the hostname. This is BROKEN without having | 303 // TODO(mbelshe): Fix the hostname. This is BROKEN without having |
| 304 // a real hostname. | 304 // a real hostname. |
| 305 socket = session_->socket_factory()->CreateSSLClientSocket( | 305 socket = session_->socket_factory()->CreateSSLClientSocket( |
| 306 socket, "" /* request_->url.HostNoBrackets() */ , ssl_config_); | 306 socket, "" /* request_->url.HostNoBrackets() */ , ssl_config_); |
| 307 connection_.set_socket(socket); | 307 connection_.set_socket(socket); |
| 308 int status = connection_.socket()->Connect(&ssl_connect_callback_); | 308 // TODO(willchan): Plumb LoadLog into FLIP code. |
| 309 int status = connection_.socket()->Connect(&ssl_connect_callback_, NULL); |
| 309 CHECK(status == net::ERR_IO_PENDING); | 310 CHECK(status == net::ERR_IO_PENDING); |
| 310 } else { | 311 } else { |
| 311 connection_ready_ = true; | 312 connection_ready_ = true; |
| 312 | 313 |
| 313 // Make sure we get any pending data sent. | 314 // Make sure we get any pending data sent. |
| 314 WriteSocketLater(); | 315 WriteSocketLater(); |
| 315 // Start reading | 316 // Start reading |
| 316 ReadSocket(); | 317 ReadSocket(); |
| 317 } | 318 } |
| 318 } | 319 } |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 DeactivateStream(stream_id); | 728 DeactivateStream(stream_id); |
| 728 delete stream; | 729 delete stream; |
| 729 } | 730 } |
| 730 } | 731 } |
| 731 | 732 |
| 732 void FlipSession::OnLameDuck() { | 733 void FlipSession::OnLameDuck() { |
| 733 NOTIMPLEMENTED(); | 734 NOTIMPLEMENTED(); |
| 734 } | 735 } |
| 735 | 736 |
| 736 } // namespace net | 737 } // namespace net |
| 737 | |
| OLD | NEW |