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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 int associated_stream_id); | 439 int associated_stream_id); |
440 | 440 |
441 SpdyFrame* ConstructSpdyPushHeaders(int stream_id, | 441 SpdyFrame* ConstructSpdyPushHeaders(int stream_id, |
442 const char* const extra_headers[], | 442 const char* const extra_headers[], |
443 int extra_header_count); | 443 int extra_header_count); |
444 | 444 |
445 SpdyFrame* ConstructSpdyHeaderFrame(int stream_id, | 445 SpdyFrame* ConstructSpdyHeaderFrame(int stream_id, |
446 const char* const headers[], | 446 const char* const headers[], |
447 int header_count); | 447 int header_count); |
448 | 448 |
| 449 // Constructs a SPDY header frame with END_STREAM flag set to |fin|. |
| 450 SpdyFrame* ConstructSpdyHeaderFrame(int stream_id, |
| 451 const char* const headers[], |
| 452 int header_count, |
| 453 bool fin); |
| 454 |
449 // Construct a SPDY syn (HEADERS or SYN_STREAM, depending on protocol | 455 // Construct a SPDY syn (HEADERS or SYN_STREAM, depending on protocol |
450 // version) carrying exactly the given headers and priority. | 456 // version) carrying exactly the given headers and priority. |
451 SpdyFrame* ConstructSpdySyn(int stream_id, | 457 SpdyFrame* ConstructSpdySyn(int stream_id, |
452 const SpdyHeaderBlock& headers, | 458 const SpdyHeaderBlock& headers, |
453 RequestPriority priority, | 459 RequestPriority priority, |
454 bool compressed, | 460 bool compressed, |
455 bool fin); | 461 bool fin); |
456 | 462 |
457 // Construct a SPDY reply (HEADERS or SYN_REPLY, depending on protocol | 463 // Construct a SPDY reply (HEADERS or SYN_REPLY, depending on protocol |
458 // version) carrying exactly the given headers, and the default priority | 464 // version) carrying exactly the given headers, and the default priority |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 GURL default_url_; | 576 GURL default_url_; |
571 bool dependency_priorities_; | 577 bool dependency_priorities_; |
572 | 578 |
573 // Track a FIFO list of the stream_id of all created requests by priority. | 579 // Track a FIFO list of the stream_id of all created requests by priority. |
574 std::map<int, std::vector<int>> priority_to_stream_id_list_; | 580 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
575 }; | 581 }; |
576 | 582 |
577 } // namespace net | 583 } // namespace net |
578 | 584 |
579 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 585 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
OLD | NEW |