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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 size_t send_frame_size_limit() const { return send_frame_size_limit_; } | 528 size_t send_frame_size_limit() const { return send_frame_size_limit_; } |
529 | 529 |
530 void set_send_frame_size_limit(size_t send_frame_size_limit) { | 530 void set_send_frame_size_limit(size_t send_frame_size_limit) { |
531 send_frame_size_limit_ = send_frame_size_limit; | 531 send_frame_size_limit_ = send_frame_size_limit; |
532 } | 532 } |
533 | 533 |
534 void set_recv_frame_size_limit(size_t recv_frame_size_limit) { | 534 void set_recv_frame_size_limit(size_t recv_frame_size_limit) { |
535 recv_frame_size_limit_ = recv_frame_size_limit; | 535 recv_frame_size_limit_ = recv_frame_size_limit; |
536 } | 536 } |
537 | 537 |
538 void SetDecoderHeaderTableDebugVisitor( | |
539 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor); | |
540 | |
541 void SetEncoderHeaderTableDebugVisitor( | |
542 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor); | |
543 | |
544 // Returns the (minimum) size of frames (sans variable-length portions). | 538 // Returns the (minimum) size of frames (sans variable-length portions). |
545 size_t GetDataFrameMinimumSize() const; | 539 size_t GetDataFrameMinimumSize() const; |
546 size_t GetFrameHeaderSize() const; | 540 size_t GetFrameHeaderSize() const; |
547 size_t GetSynStreamMinimumSize() const; | 541 size_t GetSynStreamMinimumSize() const; |
548 size_t GetSynReplyMinimumSize() const; | 542 size_t GetSynReplyMinimumSize() const; |
549 size_t GetRstStreamMinimumSize() const; | 543 size_t GetRstStreamMinimumSize() const; |
550 size_t GetSettingsMinimumSize() const; | 544 size_t GetSettingsMinimumSize() const; |
551 size_t GetPingSize() const; | 545 size_t GetPingSize() const; |
552 size_t GetGoAwayMinimumSize() const; | 546 size_t GetGoAwayMinimumSize() const; |
553 size_t GetHeadersMinimumSize() const; | 547 size_t GetHeadersMinimumSize() const; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 SpdyStreamId stream_id, | 584 SpdyStreamId stream_id, |
591 const char* data, | 585 const char* data, |
592 size_t len); | 586 size_t len); |
593 | 587 |
594 // Updates the maximum size of the header encoder compression table. | 588 // Updates the maximum size of the header encoder compression table. |
595 void UpdateHeaderEncoderTableSize(uint32_t value); | 589 void UpdateHeaderEncoderTableSize(uint32_t value); |
596 | 590 |
597 // Returns the maximum size of the header encoder compression table. | 591 // Returns the maximum size of the header encoder compression table. |
598 size_t header_encoder_table_size() const; | 592 size_t header_encoder_table_size() const; |
599 | 593 |
| 594 void SetDecoderHeaderTableDebugVisitor( |
| 595 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor); |
| 596 |
| 597 void SetEncoderHeaderTableDebugVisitor( |
| 598 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor); |
| 599 |
600 // For testing support (i.e. for clients and backends), | 600 // For testing support (i.e. for clients and backends), |
601 // allow overriding the flag on a per framer basis. | 601 // allow overriding the flag on a per framer basis. |
602 void set_use_new_methods_for_test(bool v) { use_new_methods_ = v; } | 602 void set_use_new_methods_for_test(bool v) { use_new_methods_ = v; } |
603 bool use_new_methods_for_test() const { return use_new_methods_; } | 603 bool use_new_methods_for_test() const { return use_new_methods_; } |
604 | 604 |
605 protected: | 605 protected: |
606 friend class BufferedSpdyFramer; | 606 friend class BufferedSpdyFramer; |
607 friend class HttpNetworkLayer; // This is temporary for the server. | 607 friend class HttpNetworkLayer; // This is temporary for the server. |
608 friend class HttpNetworkTransactionTest; | 608 friend class HttpNetworkTransactionTest; |
609 friend class HttpProxyClientSocketPoolTest; | 609 friend class HttpProxyClientSocketPoolTest; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 // rather than reading all available input. | 857 // rather than reading all available input. |
858 bool process_single_input_frame_ = false; | 858 bool process_single_input_frame_ = false; |
859 | 859 |
860 bool use_new_methods_ = | 860 bool use_new_methods_ = |
861 FLAGS_chromium_http2_flag_spdy_framer_use_new_methods3; | 861 FLAGS_chromium_http2_flag_spdy_framer_use_new_methods3; |
862 }; | 862 }; |
863 | 863 |
864 } // namespace net | 864 } // namespace net |
865 | 865 |
866 #endif // NET_SPDY_SPDY_FRAMER_H_ | 866 #endif // NET_SPDY_SPDY_FRAMER_H_ |
OLD | NEW |