| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 DCHECK(protocol >= kProtoSPDY2); | 399 DCHECK(protocol >= kProtoSPDY2); |
| 400 DCHECK(protocol <= kProtoSPDY3); | 400 DCHECK(protocol <= kProtoSPDY3); |
| 401 int version = (protocol == kProtoSPDY3) ? 3 : 2; | 401 int version = (protocol == kProtoSPDY3) ? 3 : 2; |
| 402 flow_control_ = (protocol >= kProtoSPDY3); | 402 flow_control_ = (protocol >= kProtoSPDY3); |
| 403 | 403 |
| 404 buffered_spdy_framer_.reset(new BufferedSpdyFramer(version)); | 404 buffered_spdy_framer_.reset(new BufferedSpdyFramer(version)); |
| 405 buffered_spdy_framer_->set_visitor(this); | 405 buffered_spdy_framer_->set_visitor(this); |
| 406 SendInitialSettings(); | 406 SendInitialSettings(); |
| 407 UMA_HISTOGRAM_ENUMERATION("Net.SpdyVersion", protocol, kProtoMaximumVersion); |
| 407 | 408 |
| 408 // Write out any data that we might have to send, such as the settings frame. | 409 // Write out any data that we might have to send, such as the settings frame. |
| 409 WriteSocketLater(); | 410 WriteSocketLater(); |
| 410 net::Error error = ReadSocket(); | 411 net::Error error = ReadSocket(); |
| 411 if (error == ERR_IO_PENDING) | 412 if (error == ERR_IO_PENDING) |
| 412 return OK; | 413 return OK; |
| 413 return error; | 414 return error; |
| 414 } | 415 } |
| 415 | 416 |
| 416 bool SpdySession::VerifyDomainAuthentication(const std::string& domain) { | 417 bool SpdySession::VerifyDomainAuthentication(const std::string& domain) { |
| (...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 1991 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
| 1991 if (!is_secure_) | 1992 if (!is_secure_) |
| 1992 return NULL; | 1993 return NULL; |
| 1993 SSLClientSocket* ssl_socket = | 1994 SSLClientSocket* ssl_socket = |
| 1994 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 1995 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
| 1995 DCHECK(ssl_socket); | 1996 DCHECK(ssl_socket); |
| 1996 return ssl_socket; | 1997 return ssl_socket; |
| 1997 } | 1998 } |
| 1998 | 1999 |
| 1999 } // namespace net | 2000 } // namespace net |
| OLD | NEW |