OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 // Construct a SPDY WINDOW_UPDATE frame. | 330 // Construct a SPDY WINDOW_UPDATE frame. |
331 // Returns the constructed frame. The caller takes ownership of the frame. | 331 // Returns the constructed frame. The caller takes ownership of the frame. |
332 SpdySerializedFrame ConstructSpdyWindowUpdate(SpdyStreamId stream_id, | 332 SpdySerializedFrame ConstructSpdyWindowUpdate(SpdyStreamId stream_id, |
333 uint32_t delta_window_size); | 333 uint32_t delta_window_size); |
334 | 334 |
335 // Construct a SPDY RST_STREAM frame. | 335 // Construct a SPDY RST_STREAM frame. |
336 // Returns the constructed frame. The caller takes ownership of the frame. | 336 // Returns the constructed frame. The caller takes ownership of the frame. |
337 SpdySerializedFrame ConstructSpdyRstStream(SpdyStreamId stream_id, | 337 SpdySerializedFrame ConstructSpdyRstStream(SpdyStreamId stream_id, |
338 SpdyRstStreamStatus status); | 338 SpdyRstStreamStatus status); |
339 | 339 |
| 340 // Construct a PRIORITY frame. The weight is derived from |request_priority|. |
| 341 // Returns the constructed frame. The caller takes ownership of the frame. |
| 342 SpdySerializedFrame ConstructSpdyPriority(SpdyStreamId stream_id, |
| 343 SpdyStreamId parent_stream_id, |
| 344 RequestPriority request_priority, |
| 345 bool exclusive); |
| 346 |
340 // Constructs a standard SPDY GET HEADERS frame for |url| with header | 347 // Constructs a standard SPDY GET HEADERS frame for |url| with header |
341 // compression. | 348 // compression. |
342 // |extra_headers| are the extra header-value pairs, which typically | 349 // |extra_headers| are the extra header-value pairs, which typically |
343 // will vary the most between calls. | 350 // will vary the most between calls. |
344 // Returns a SpdySerializedFrame. | 351 // Returns a SpdySerializedFrame. |
345 SpdySerializedFrame ConstructSpdyGet(const char* const url, | 352 SpdySerializedFrame ConstructSpdyGet(const char* const url, |
346 SpdyStreamId stream_id, | 353 SpdyStreamId stream_id, |
347 RequestPriority request_priority); | 354 RequestPriority request_priority); |
348 | 355 |
349 // Constructs a standard SPDY GET HEADERS frame with header compression. | 356 // Constructs a standard SPDY GET HEADERS frame with header compression. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 522 |
516 GURL default_url_; | 523 GURL default_url_; |
517 | 524 |
518 // Track a FIFO list of the stream_id of all created requests by priority. | 525 // Track a FIFO list of the stream_id of all created requests by priority. |
519 std::map<int, std::vector<int>> priority_to_stream_id_list_; | 526 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
520 }; | 527 }; |
521 | 528 |
522 } // namespace net | 529 } // namespace net |
523 | 530 |
524 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 531 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
OLD | NEW |