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_QUIC_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 // |retransmitted_bytes| is the number of data bytes retransmitted. | 601 // |retransmitted_bytes| is the number of data bytes retransmitted. |
602 virtual void OnPacketRetransmitted(int retransmitted_bytes) = 0; | 602 virtual void OnPacketRetransmitted(int retransmitted_bytes) = 0; |
603 | 603 |
604 protected: | 604 protected: |
605 friend class base::RefCounted<QuicAckListenerInterface>; | 605 friend class base::RefCounted<QuicAckListenerInterface>; |
606 | 606 |
607 // Delegates are ref counted. | 607 // Delegates are ref counted. |
608 virtual ~QuicAckListenerInterface() {} | 608 virtual ~QuicAckListenerInterface() {} |
609 }; | 609 }; |
610 | 610 |
611 // Used to generate filtered supported versions based on flags. | |
612 class NET_EXPORT_PRIVATE QuicVersionManager { | |
613 public: | |
614 explicit QuicVersionManager(QuicVersionVector supported_versions); | |
615 virtual ~QuicVersionManager(); | |
616 | |
617 // Returns currently supported QUIC versions. | |
618 const QuicVersionVector& GetSupportedVersions(); | |
619 | |
620 protected: | |
621 // Maybe refilter filtered_supported_versions_ based on flags. | |
622 void MaybeRefilterSupportedVersions(); | |
623 | |
624 // Refilters filtered_supported_versions_. | |
625 virtual void RefilterSupportedVersions(); | |
626 | |
627 const QuicVersionVector& filtered_supported_versions() const { | |
628 return filtered_supported_versions_; | |
629 } | |
630 | |
631 private: | |
632 // FLAGS_quic_enable_version_36_v3 | |
633 bool enable_version_36_; | |
634 // The list of versions that may be supported. | |
635 QuicVersionVector allowed_supported_versions_; | |
636 // This vector contains QUIC versions which are currently supported based | |
637 // on flags. | |
638 QuicVersionVector filtered_supported_versions_; | |
639 }; | |
640 | |
641 struct NET_EXPORT_PRIVATE AckListenerWrapper { | 611 struct NET_EXPORT_PRIVATE AckListenerWrapper { |
642 AckListenerWrapper(QuicAckListenerInterface* listener, | 612 AckListenerWrapper(QuicAckListenerInterface* listener, |
643 QuicPacketLength data_length); | 613 QuicPacketLength data_length); |
644 AckListenerWrapper(const AckListenerWrapper& other); | 614 AckListenerWrapper(const AckListenerWrapper& other); |
645 ~AckListenerWrapper(); | 615 ~AckListenerWrapper(); |
646 | 616 |
647 scoped_refptr<QuicAckListenerInterface> ack_listener; | 617 scoped_refptr<QuicAckListenerInterface> ack_listener; |
648 QuicPacketLength length; | 618 QuicPacketLength length; |
649 }; | 619 }; |
650 | 620 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 QuicPathId path_id; | 727 QuicPathId path_id; |
758 bool has_crypto_handshake; | 728 bool has_crypto_handshake; |
759 int num_padding_bytes; | 729 int num_padding_bytes; |
760 EncryptionLevel encryption_level; | 730 EncryptionLevel encryption_level; |
761 QuicPacketNumberLength packet_number_length; | 731 QuicPacketNumberLength packet_number_length; |
762 }; | 732 }; |
763 | 733 |
764 } // namespace net | 734 } // namespace net |
765 | 735 |
766 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 736 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |