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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 const char* data, | 506 const char* data, |
507 uint32_t len, | 507 uint32_t len, |
508 bool fin, | 508 bool fin, |
509 int padding_length); | 509 int padding_length); |
510 | 510 |
511 // Wraps |frame| in the payload of a data frame in stream |stream_id|. | 511 // Wraps |frame| in the payload of a data frame in stream |stream_id|. |
512 SpdySerializedFrame* ConstructWrappedSpdyFrame( | 512 SpdySerializedFrame* ConstructWrappedSpdyFrame( |
513 const std::unique_ptr<SpdySerializedFrame>& frame, | 513 const std::unique_ptr<SpdySerializedFrame>& frame, |
514 int stream_id); | 514 int stream_id); |
515 | 515 |
| 516 // Serialize a SpdyFrameIR with |headerless_spdy_framer_|. |
| 517 SpdySerializedFrame SerializeFrame(const SpdyFrameIR& frame_ir); |
| 518 |
516 // Called when necessary (when it will affect stream dependency specification | 519 // Called when necessary (when it will affect stream dependency specification |
517 // when setting dependencies based on priorioties) to notify the utility | 520 // when setting dependencies based on priorioties) to notify the utility |
518 // class of stream destruction. | 521 // class of stream destruction. |
519 void UpdateWithStreamDestruction(int stream_id); | 522 void UpdateWithStreamDestruction(int stream_id); |
520 | 523 |
521 // For versions below SPDY4, adds the version HTTP/1.1 header. | 524 // For versions below SPDY4, adds the version HTTP/1.1 header. |
522 void MaybeAddVersionHeader(SpdyFrameWithHeaderBlockIR* frame_ir) const; | 525 void MaybeAddVersionHeader(SpdyFrameWithHeaderBlockIR* frame_ir) const; |
523 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; | 526 void MaybeAddVersionHeader(SpdyHeaderBlock* block) const; |
524 | 527 |
525 // Maps |priority| to SPDY version priority, and sets it on |frame_ir|. | 528 // Maps |priority| to SPDY version priority, and sets it on |frame_ir|. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 GURL default_url_; | 565 GURL default_url_; |
563 bool dependency_priorities_; | 566 bool dependency_priorities_; |
564 | 567 |
565 // Track a FIFO list of the stream_id of all created requests by priority. | 568 // Track a FIFO list of the stream_id of all created requests by priority. |
566 std::map<int, std::vector<int>> priority_to_stream_id_list_; | 569 std::map<int, std::vector<int>> priority_to_stream_id_list_; |
567 }; | 570 }; |
568 | 571 |
569 } // namespace net | 572 } // namespace net |
570 | 573 |
571 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ | 574 #endif // NET_SPDY_SPDY_TEST_UTIL_COMMON_H_ |
OLD | NEW |