| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 if (ssl_socket && ssl_socket->WasDomainBoundCertSent()) { | 445 if (ssl_socket && ssl_socket->WasDomainBoundCertSent()) { |
| 446 // According to the SPDY spec, the credential associated with the TLS | 446 // According to the SPDY spec, the credential associated with the TLS |
| 447 // connection is stored in slot[1]. | 447 // connection is stored in slot[1]. |
| 448 credential_state_.SetHasCredential(GURL("https://" + | 448 credential_state_.SetHasCredential(GURL("https://" + |
| 449 host_port_pair().ToString())); | 449 host_port_pair().ToString())); |
| 450 } | 450 } |
| 451 | 451 |
| 452 DCHECK(protocol >= kProtoSPDY2); | 452 DCHECK(protocol >= kProtoSPDY2); |
| 453 DCHECK(protocol <= kProtoSPDY3); | 453 DCHECK(protocol <= kProtoSPDY3); |
| 454 int version = (protocol == kProtoSPDY3) ? 3 : 2; | 454 int version = (protocol == kProtoSPDY3) ? 3 : 2; |
| 455 flow_control_ = (protocol >= kProtoSPDY21); | 455 flow_control_ = (protocol >= kProtoSPDY3); |
| 456 | 456 |
| 457 buffered_spdy_framer_.reset(new BufferedSpdyFramer(version)); | 457 buffered_spdy_framer_.reset(new BufferedSpdyFramer(version)); |
| 458 buffered_spdy_framer_->set_visitor(this); | 458 buffered_spdy_framer_->set_visitor(this); |
| 459 SendSettings(); | 459 SendSettings(); |
| 460 | 460 |
| 461 // Write out any data that we might have to send, such as the settings frame. | 461 // Write out any data that we might have to send, such as the settings frame. |
| 462 WriteSocketLater(); | 462 WriteSocketLater(); |
| 463 net::Error error = ReadSocket(); | 463 net::Error error = ReadSocket(); |
| 464 if (error == ERR_IO_PENDING) | 464 if (error == ERR_IO_PENDING) |
| 465 return OK; | 465 return OK; |
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 1973 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
| 1974 if (!is_secure_) | 1974 if (!is_secure_) |
| 1975 return NULL; | 1975 return NULL; |
| 1976 SSLClientSocket* ssl_socket = | 1976 SSLClientSocket* ssl_socket = |
| 1977 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 1977 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
| 1978 DCHECK(ssl_socket); | 1978 DCHECK(ssl_socket); |
| 1979 return ssl_socket; | 1979 return ssl_socket; |
| 1980 } | 1980 } |
| 1981 | 1981 |
| 1982 } // namespace net | 1982 } // namespace net |
| OLD | NEW |