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_protocol.h" | 5 #include "net/spdy/spdy_protocol.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( | 9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( |
10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} | 10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 } else { | 726 } else { |
727 // 14-bit length field. | 727 // 14-bit length field. |
728 return (1<<14) - 1; | 728 return (1<<14) - 1; |
729 } | 729 } |
730 } | 730 } |
731 | 731 |
732 size_t SpdyConstants::GetSizeOfSizeField(SpdyMajorVersion version) { | 732 size_t SpdyConstants::GetSizeOfSizeField(SpdyMajorVersion version) { |
733 return (version < SPDY3) ? sizeof(uint16) : sizeof(uint32); | 733 return (version < SPDY3) ? sizeof(uint16) : sizeof(uint32); |
734 } | 734 } |
735 | 735 |
| 736 size_t SpdyConstants::GetSettingSize(SpdyMajorVersion version) { |
| 737 return version <= SPDY3 ? 8 : 6; |
| 738 } |
| 739 |
736 void SpdyDataIR::Visit(SpdyFrameVisitor* visitor) const { | 740 void SpdyDataIR::Visit(SpdyFrameVisitor* visitor) const { |
737 return visitor->VisitData(*this); | 741 return visitor->VisitData(*this); |
738 } | 742 } |
739 | 743 |
740 void SpdySynStreamIR::Visit(SpdyFrameVisitor* visitor) const { | 744 void SpdySynStreamIR::Visit(SpdyFrameVisitor* visitor) const { |
741 return visitor->VisitSynStream(*this); | 745 return visitor->VisitSynStream(*this); |
742 } | 746 } |
743 | 747 |
744 void SpdySynReplyIR::Visit(SpdyFrameVisitor* visitor) const { | 748 void SpdySynReplyIR::Visit(SpdyFrameVisitor* visitor) const { |
745 return visitor->VisitSynReply(*this); | 749 return visitor->VisitSynReply(*this); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 parent_stream_id_(parent_stream_id), | 836 parent_stream_id_(parent_stream_id), |
833 weight_(weight), | 837 weight_(weight), |
834 exclusive_(exclusive) { | 838 exclusive_(exclusive) { |
835 } | 839 } |
836 | 840 |
837 void SpdyPriorityIR::Visit(SpdyFrameVisitor* visitor) const { | 841 void SpdyPriorityIR::Visit(SpdyFrameVisitor* visitor) const { |
838 return visitor->VisitPriority(*this); | 842 return visitor->VisitPriority(*this); |
839 } | 843 } |
840 | 844 |
841 } // namespace net | 845 } // namespace net |
OLD | NEW |