| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 const char* location); | 458 const char* location); |
| 459 | 459 |
| 460 SpdyFrame* ConstructInitialSpdyPushFrame(scoped_ptr<SpdyHeaderBlock> headers, | 460 SpdyFrame* ConstructInitialSpdyPushFrame(scoped_ptr<SpdyHeaderBlock> headers, |
| 461 int stream_id, | 461 int stream_id, |
| 462 int associated_stream_id); | 462 int associated_stream_id); |
| 463 | 463 |
| 464 SpdyFrame* ConstructSpdyPushHeaders(int stream_id, | 464 SpdyFrame* ConstructSpdyPushHeaders(int stream_id, |
| 465 const char* const extra_headers[], | 465 const char* const extra_headers[], |
| 466 int extra_header_count); | 466 int extra_header_count); |
| 467 | 467 |
| 468 // Construct a SPDY syn (HEADERS or SYN_STREAM, depending on protocol |
| 469 // version) carrying exactly the given headers and priority. |
| 470 SpdyFrame* ConstructSpdySyn(int stream_id, |
| 471 const SpdyHeaderBlock& headers, |
| 472 RequestPriority priority, |
| 473 bool compressed, |
| 474 bool fin) const; |
| 475 |
| 468 // Construct a SPDY reply (HEADERS or SYN_REPLY, depending on protocol | 476 // Construct a SPDY reply (HEADERS or SYN_REPLY, depending on protocol |
| 469 // version) carrying exactly the given headers, and the default priority | 477 // version) carrying exactly the given headers, and the default priority |
| 470 // (or no priority, depending on protocl version). | 478 // (or no priority, depending on protocl version). |
| 471 // The |headers| parameter variant is preferred. | 479 // The |headers| parameter variant is preferred. |
| 472 SpdyFrame* ConstructSpdyReply(int stream_id, const SpdyHeaderBlock& headers); | 480 SpdyFrame* ConstructSpdyReply(int stream_id, const SpdyHeaderBlock& headers); |
| 473 | 481 |
| 474 // Constructs a standard SPDY SYN_REPLY frame to match the SPDY GET. | 482 // Constructs a standard SPDY SYN_REPLY frame to match the SPDY GET. |
| 475 // |extra_headers| are the extra header-value pairs, which typically | 483 // |extra_headers| are the extra header-value pairs, which typically |
| 476 // will vary the most between calls. | 484 // will vary the most between calls. |
| 477 // Returns a SpdyFrame. | 485 // Returns a SpdyFrame. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 base::StringPiece url, | 572 base::StringPiece url, |
| 565 int64* content_length) const; | 573 int64* content_length) const; |
| 566 | 574 |
| 567 const NextProto protocol_; | 575 const NextProto protocol_; |
| 568 const SpdyMajorVersion spdy_version_; | 576 const SpdyMajorVersion spdy_version_; |
| 569 }; | 577 }; |
| 570 | 578 |
| 571 } // namespace net | 579 } // namespace net |
| 572 | 580 |
| 573 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 581 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
| OLD | NEW |