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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 return false; | 586 return false; |
587 if (!ssl_socket->WasOriginBoundCertSent()) | 587 if (!ssl_socket->WasOriginBoundCertSent()) |
588 return false; | 588 return false; |
589 return !credential_state_.HasCredential(origin); | 589 return !credential_state_.HasCredential(origin); |
590 } | 590 } |
591 | 591 |
592 void SpdySession::AddPooledAlias(const HostPortProxyPair& alias) { | 592 void SpdySession::AddPooledAlias(const HostPortProxyPair& alias) { |
593 pooled_aliases_.insert(alias); | 593 pooled_aliases_.insert(alias); |
594 } | 594 } |
595 | 595 |
| 596 int SpdySession::GetProtocolVersion() const { |
| 597 DCHECK(buffered_spdy_framer_.get()); |
| 598 return buffered_spdy_framer_->protocol_version(); |
| 599 } |
| 600 |
596 int SpdySession::WriteSynStream( | 601 int SpdySession::WriteSynStream( |
597 spdy::SpdyStreamId stream_id, | 602 spdy::SpdyStreamId stream_id, |
598 RequestPriority priority, | 603 RequestPriority priority, |
599 spdy::SpdyControlFlags flags, | 604 spdy::SpdyControlFlags flags, |
600 const linked_ptr<spdy::SpdyHeaderBlock>& headers) { | 605 const linked_ptr<spdy::SpdyHeaderBlock>& headers) { |
601 // Find our stream | 606 // Find our stream |
602 if (!IsStreamActive(stream_id)) | 607 if (!IsStreamActive(stream_id)) |
603 return ERR_INVALID_SPDY_STREAM; | 608 return ERR_INVALID_SPDY_STREAM; |
604 const scoped_refptr<SpdyStream>& stream = active_streams_[stream_id]; | 609 const scoped_refptr<SpdyStream>& stream = active_streams_[stream_id]; |
605 CHECK_EQ(stream->stream_id(), stream_id); | 610 CHECK_EQ(stream->stream_id(), stream_id); |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 1930 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
1926 if (!is_secure_) | 1931 if (!is_secure_) |
1927 return NULL; | 1932 return NULL; |
1928 SSLClientSocket* ssl_socket = | 1933 SSLClientSocket* ssl_socket = |
1929 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 1934 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
1930 DCHECK(ssl_socket); | 1935 DCHECK(ssl_socket); |
1931 return ssl_socket; | 1936 return ssl_socket; |
1932 } | 1937 } |
1933 | 1938 |
1934 } // namespace net | 1939 } // namespace net |
OLD | NEW |