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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1673 dict->SetBoolean("received_settings", received_settings_); | 1673 dict->SetBoolean("received_settings", received_settings_); |
1674 | 1674 |
1675 dict->SetInteger("send_window_size", session_send_window_size_); | 1675 dict->SetInteger("send_window_size", session_send_window_size_); |
1676 dict->SetInteger("recv_window_size", session_recv_window_size_); | 1676 dict->SetInteger("recv_window_size", session_recv_window_size_); |
1677 dict->SetInteger("unacked_recv_window_bytes", | 1677 dict->SetInteger("unacked_recv_window_bytes", |
1678 session_unacked_recv_window_bytes_); | 1678 session_unacked_recv_window_bytes_); |
1679 return dict; | 1679 return dict; |
1680 } | 1680 } |
1681 | 1681 |
1682 bool SpdySession::IsReused() const { | 1682 bool SpdySession::IsReused() const { |
1683 return buffered_spdy_framer_->frames_received() > 0; | 1683 return buffered_spdy_framer_->frames_received() > 0 || |
mmenke
2014/03/18 15:16:55
Hrm... If we always received a settings frame fir
davidben
2014/03/18 22:53:55
SETTINGS frames aren't counted in this. It's oddly
| |
1684 connection_->reuse_type() == ClientSocketHandle::UNUSED_IDLE; | |
mmenke
2014/03/18 15:16:55
can we just use connection->is_reused()? Yes, it
davidben
2014/03/18 22:53:55
is_reused() is actually only REUSED_IDLE, not UNUS
| |
1684 } | 1685 } |
1685 | 1686 |
1686 bool SpdySession::GetLoadTimingInfo(SpdyStreamId stream_id, | 1687 bool SpdySession::GetLoadTimingInfo(SpdyStreamId stream_id, |
1687 LoadTimingInfo* load_timing_info) const { | 1688 LoadTimingInfo* load_timing_info) const { |
1688 return connection_->GetLoadTimingInfo(stream_id != kFirstStreamId, | 1689 return connection_->GetLoadTimingInfo(stream_id != kFirstStreamId, |
1689 load_timing_info); | 1690 load_timing_info); |
1690 } | 1691 } |
1691 | 1692 |
1692 int SpdySession::GetPeerAddress(IPEndPoint* address) const { | 1693 int SpdySession::GetPeerAddress(IPEndPoint* address) const { |
1693 int rv = ERR_SOCKET_NOT_CONNECTED; | 1694 int rv = ERR_SOCKET_NOT_CONNECTED; |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3039 if (!queue->empty()) { | 3040 if (!queue->empty()) { |
3040 SpdyStreamId stream_id = queue->front(); | 3041 SpdyStreamId stream_id = queue->front(); |
3041 queue->pop_front(); | 3042 queue->pop_front(); |
3042 return stream_id; | 3043 return stream_id; |
3043 } | 3044 } |
3044 } | 3045 } |
3045 return 0; | 3046 return 0; |
3046 } | 3047 } |
3047 | 3048 |
3048 } // namespace net | 3049 } // namespace net |
OLD | NEW |