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_test_util_spdy2.h" | 5 #include "net/spdy/spdy_test_util_spdy2.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 // Construct a SPDY PING frame. | 139 // Construct a SPDY PING frame. |
140 // Returns the constructed frame. The caller takes ownership of the frame. | 140 // Returns the constructed frame. The caller takes ownership of the frame. |
141 SpdyFrame* ConstructSpdyPing(uint32 ping_id) { | 141 SpdyFrame* ConstructSpdyPing(uint32 ping_id) { |
142 BufferedSpdyFramer framer(2, false); | 142 BufferedSpdyFramer framer(2, false); |
143 return framer.CreatePingFrame(ping_id); | 143 return framer.CreatePingFrame(ping_id); |
144 } | 144 } |
145 | 145 |
146 // Construct a SPDY GOAWAY frame. | 146 // Construct a SPDY GOAWAY frame. |
147 // Returns the constructed frame. The caller takes ownership of the frame. | 147 // Returns the constructed frame. The caller takes ownership of the frame. |
148 SpdyFrame* ConstructSpdyGoAway() { | 148 SpdyFrame* ConstructSpdyGoAway() { |
149 return ConstructSpdyGoAway(0); | |
150 } | |
151 | |
152 // Construct a SPDY GOAWAY frame. | |
akalin
2013/04/17 21:14:20
i don't know if it's worth having the same comment
Ryan Hamilton
2013/04/18 00:30:40
Yeah, I was surprised to see them too, but decided
akalin
2013/04/18 01:29:59
even better!
| |
153 // Returns the constructed frame. The caller takes ownership of the frame. | |
154 SpdyFrame* ConstructSpdyGoAway(SpdyStreamId last_good_stream_id) { | |
149 BufferedSpdyFramer framer(2, false); | 155 BufferedSpdyFramer framer(2, false); |
150 return framer.CreateGoAway(0, GOAWAY_OK); | 156 return framer.CreateGoAway(last_good_stream_id, GOAWAY_OK); |
151 } | 157 } |
152 | 158 |
153 // Construct a SPDY WINDOW_UPDATE frame. | 159 // Construct a SPDY WINDOW_UPDATE frame. |
154 // Returns the constructed frame. The caller takes ownership of the frame. | 160 // Returns the constructed frame. The caller takes ownership of the frame. |
155 SpdyFrame* ConstructSpdyWindowUpdate( | 161 SpdyFrame* ConstructSpdyWindowUpdate( |
156 const SpdyStreamId stream_id, uint32 delta_window_size) { | 162 const SpdyStreamId stream_id, uint32 delta_window_size) { |
157 BufferedSpdyFramer framer(2, false); | 163 BufferedSpdyFramer framer(2, false); |
158 return framer.CreateWindowUpdate(stream_id, delta_window_size); | 164 return framer.CreateWindowUpdate(stream_id, delta_window_size); |
159 } | 165 } |
160 | 166 |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
826 RST_STREAM_INVALID, // Status | 832 RST_STREAM_INVALID, // Status |
827 NULL, // Data | 833 NULL, // Data |
828 0, // Length | 834 0, // Length |
829 DATA_FLAG_NONE // Data Flags | 835 DATA_FLAG_NONE // Data Flags |
830 }; | 836 }; |
831 return kHeader; | 837 return kHeader; |
832 } | 838 } |
833 | 839 |
834 } // namespace test_spdy2 | 840 } // namespace test_spdy2 |
835 } // namespace net | 841 } // namespace net |
OLD | NEW |