| 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 #ifndef NET_SPDY_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_SPDY_FRAMER_H_ |
| 6 #define NET_SPDY_SPDY_FRAMER_H_ | 6 #define NET_SPDY_SPDY_FRAMER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 static SpdyPriority MapWeightToPriority(uint8 weight); | 583 static SpdyPriority MapWeightToPriority(uint8 weight); |
| 584 | 584 |
| 585 // Deliver the given control frame's compressed headers block to the visitor | 585 // Deliver the given control frame's compressed headers block to the visitor |
| 586 // in decompressed form, in chunks. Returns true if the visitor has | 586 // in decompressed form, in chunks. Returns true if the visitor has |
| 587 // accepted all of the chunks. | 587 // accepted all of the chunks. |
| 588 bool IncrementallyDecompressControlFrameHeaderData( | 588 bool IncrementallyDecompressControlFrameHeaderData( |
| 589 SpdyStreamId stream_id, | 589 SpdyStreamId stream_id, |
| 590 const char* data, | 590 const char* data, |
| 591 size_t len); | 591 size_t len); |
| 592 | 592 |
| 593 // Updates the maximum size of header compression table. |
| 594 void UpdateHeaderTableSizeSetting(uint32 value); |
| 595 |
| 596 // Returns bound of header compression table size. |
| 597 size_t header_table_size_bound() const; |
| 598 |
| 593 protected: | 599 protected: |
| 594 // TODO(jgraettinger): Switch to test peer pattern. | 600 // TODO(jgraettinger): Switch to test peer pattern. |
| 595 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, BasicCompression); | 601 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, BasicCompression); |
| 596 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ControlFrameSizesAreValidated); | 602 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ControlFrameSizesAreValidated); |
| 597 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, HeaderCompression); | 603 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, HeaderCompression); |
| 598 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, DecompressUncompressedFrame); | 604 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, DecompressUncompressedFrame); |
| 599 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ExpandBuffer_HeapSmash); | 605 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ExpandBuffer_HeapSmash); |
| 600 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, HugeHeaderBlock); | 606 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, HugeHeaderBlock); |
| 601 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, UnclosedStreamDataCompressors); | 607 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, UnclosedStreamDataCompressors); |
| 602 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, | 608 FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 // isn't guaranteed though: we could have gotten a settings frame and then | 804 // isn't guaranteed though: we could have gotten a settings frame and then |
| 799 // corrupt data that just looks like HTTP, but deterministic checking requires | 805 // corrupt data that just looks like HTTP, but deterministic checking requires |
| 800 // a lot more state. | 806 // a lot more state. |
| 801 bool probable_http_response_; | 807 bool probable_http_response_; |
| 802 | 808 |
| 803 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM | 809 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM |
| 804 // flag is still carried in the HEADERS frame. If it's set, flip this so that | 810 // flag is still carried in the HEADERS frame. If it's set, flip this so that |
| 805 // we know to terminate the stream when the entire header block has been | 811 // we know to terminate the stream when the entire header block has been |
| 806 // processed. | 812 // processed. |
| 807 bool end_stream_when_done_; | 813 bool end_stream_when_done_; |
| 814 |
| 815 // Last acknowledged value for SETTINGS_HEADER_TABLE_SIZE. |
| 816 size_t header_table_size_bound_; |
| 808 }; | 817 }; |
| 809 | 818 |
| 810 } // namespace net | 819 } // namespace net |
| 811 | 820 |
| 812 #endif // NET_SPDY_SPDY_FRAMER_H_ | 821 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |