| 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 // This file contains some protocol structures for use with SPDY 2 and 3 | 5 // This file contains some protocol structures for use with SPDY 2 and 3 |
| 6 // The SPDY 2 spec can be found at: | 6 // The SPDY 2 spec can be found at: |
| 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 | 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 |
| 8 // The SPDY 3 spec can be found at: | 8 // The SPDY 3 spec can be found at: |
| 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 | 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 |
| 10 | 10 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 | 734 |
| 735 SpdyRstStreamStatus status() const { | 735 SpdyRstStreamStatus status() const { |
| 736 return status_; | 736 return status_; |
| 737 } | 737 } |
| 738 void set_status(SpdyRstStreamStatus status) { | 738 void set_status(SpdyRstStreamStatus status) { |
| 739 status_ = status; | 739 status_ = status; |
| 740 } | 740 } |
| 741 | 741 |
| 742 base::StringPiece description() const { return description_; } | 742 base::StringPiece description() const { return description_; } |
| 743 | 743 |
| 744 void set_description(base::StringPiece description) { | |
| 745 description_ = description; | |
| 746 } | |
| 747 | |
| 748 void Visit(SpdyFrameVisitor* visitor) const override; | 744 void Visit(SpdyFrameVisitor* visitor) const override; |
| 749 | 745 |
| 750 private: | 746 private: |
| 751 SpdyRstStreamStatus status_; | 747 SpdyRstStreamStatus status_; |
| 752 base::StringPiece description_; | 748 base::StringPiece description_; |
| 753 | 749 |
| 754 DISALLOW_COPY_AND_ASSIGN(SpdyRstStreamIR); | 750 DISALLOW_COPY_AND_ASSIGN(SpdyRstStreamIR); |
| 755 }; | 751 }; |
| 756 | 752 |
| 757 class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR { | 753 class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 776 void AddSetting(SpdySettingsIds id, | 772 void AddSetting(SpdySettingsIds id, |
| 777 bool persist_value, | 773 bool persist_value, |
| 778 bool persisted, | 774 bool persisted, |
| 779 int32 value) { | 775 int32 value) { |
| 780 values_[id].persist_value = persist_value; | 776 values_[id].persist_value = persist_value; |
| 781 values_[id].persisted = persisted; | 777 values_[id].persisted = persisted; |
| 782 values_[id].value = value; | 778 values_[id].value = value; |
| 783 } | 779 } |
| 784 | 780 |
| 785 bool clear_settings() const { return clear_settings_; } | 781 bool clear_settings() const { return clear_settings_; } |
| 786 void set_clear_settings(bool clear_settings) { | |
| 787 clear_settings_ = clear_settings; | |
| 788 } | |
| 789 bool is_ack() const { return is_ack_; } | 782 bool is_ack() const { return is_ack_; } |
| 790 void set_is_ack(bool is_ack) { | 783 void set_is_ack(bool is_ack) { |
| 791 is_ack_ = is_ack; | 784 is_ack_ = is_ack; |
| 792 } | 785 } |
| 793 | 786 |
| 794 void Visit(SpdyFrameVisitor* visitor) const override; | 787 void Visit(SpdyFrameVisitor* visitor) const override; |
| 795 | 788 |
| 796 private: | 789 private: |
| 797 ValueMap values_; | 790 ValueMap values_; |
| 798 bool clear_settings_; | 791 bool clear_settings_; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 | 913 |
| 921 class NET_EXPORT_PRIVATE SpdyPushPromiseIR | 914 class NET_EXPORT_PRIVATE SpdyPushPromiseIR |
| 922 : public SpdyFrameWithNameValueBlockIR { | 915 : public SpdyFrameWithNameValueBlockIR { |
| 923 public: | 916 public: |
| 924 SpdyPushPromiseIR(SpdyStreamId stream_id, SpdyStreamId promised_stream_id) | 917 SpdyPushPromiseIR(SpdyStreamId stream_id, SpdyStreamId promised_stream_id) |
| 925 : SpdyFrameWithNameValueBlockIR(stream_id), | 918 : SpdyFrameWithNameValueBlockIR(stream_id), |
| 926 promised_stream_id_(promised_stream_id), | 919 promised_stream_id_(promised_stream_id), |
| 927 padded_(false), | 920 padded_(false), |
| 928 padding_payload_len_(0) {} | 921 padding_payload_len_(0) {} |
| 929 SpdyStreamId promised_stream_id() const { return promised_stream_id_; } | 922 SpdyStreamId promised_stream_id() const { return promised_stream_id_; } |
| 930 void set_promised_stream_id(SpdyStreamId id) { promised_stream_id_ = id; } | |
| 931 | 923 |
| 932 void Visit(SpdyFrameVisitor* visitor) const override; | 924 void Visit(SpdyFrameVisitor* visitor) const override; |
| 933 | 925 |
| 934 bool padded() const { return padded_; } | 926 bool padded() const { return padded_; } |
| 935 int padding_payload_len() const { return padding_payload_len_; } | 927 int padding_payload_len() const { return padding_payload_len_; } |
| 936 void set_padding_len(int padding_len) { | 928 void set_padding_len(int padding_len) { |
| 937 DCHECK_GT(padding_len, 0); | 929 DCHECK_GT(padding_len, 0); |
| 938 DCHECK_LE(padding_len, kPaddingSizePerFrame); | 930 DCHECK_LE(padding_len, kPaddingSizePerFrame); |
| 939 padded_ = true; | 931 padded_ = true; |
| 940 // The pad field takes one octet on the wire. | 932 // The pad field takes one octet on the wire. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 SpdyFrameVisitor() {} | 1083 SpdyFrameVisitor() {} |
| 1092 virtual ~SpdyFrameVisitor() {} | 1084 virtual ~SpdyFrameVisitor() {} |
| 1093 | 1085 |
| 1094 private: | 1086 private: |
| 1095 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 1087 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
| 1096 }; | 1088 }; |
| 1097 | 1089 |
| 1098 } // namespace net | 1090 } // namespace net |
| 1099 | 1091 |
| 1100 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 1092 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
| OLD | NEW |