| 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 // Called when an unrecoverable error is encountered. | 609 // Called when an unrecoverable error is encountered. |
| 610 virtual void OnUnrecoverableError(QuicErrorCode error, | 610 virtual void OnUnrecoverableError(QuicErrorCode error, |
| 611 const std::string& error_details, | 611 const std::string& error_details, |
| 612 ConnectionCloseSource source) = 0; | 612 ConnectionCloseSource source) = 0; |
| 613 }; | 613 }; |
| 614 | 614 |
| 615 // Used to generate filtered supported versions based on flags. | 615 // Used to generate filtered supported versions based on flags. |
| 616 class NET_EXPORT_PRIVATE QuicVersionManager { | 616 class NET_EXPORT_PRIVATE QuicVersionManager { |
| 617 public: | 617 public: |
| 618 explicit QuicVersionManager(QuicVersionVector supported_versions); | 618 explicit QuicVersionManager(QuicVersionVector supported_versions); |
| 619 ~QuicVersionManager(); | 619 virtual ~QuicVersionManager(); |
| 620 | 620 |
| 621 // Returns supported versions based on flags. | 621 // Returns currently supported QUIC versions. |
| 622 const QuicVersionVector& GetSupportedVersions(); | 622 const QuicVersionVector& GetSupportedVersions(); |
| 623 | 623 |
| 624 protected: |
| 625 // Maybe refilter filtered_supported_versions_ based on flags. |
| 626 void MaybeRefilterSupportedVersions(); |
| 627 |
| 628 // Refilters filtered_supported_versions_. |
| 629 virtual void RefilterSupportedVersions(); |
| 630 |
| 631 const QuicVersionVector& filtered_supported_versions() const { |
| 632 return filtered_supported_versions_; |
| 633 } |
| 634 |
| 624 private: | 635 private: |
| 625 // FLAGS_quic_enable_version_36_v3 | 636 // FLAGS_quic_enable_version_36_v3 |
| 626 bool enable_version_36_; | 637 bool enable_version_36_; |
| 627 // The list of versions that may be supported. | 638 // The list of versions that may be supported. |
| 628 QuicVersionVector allowed_supported_versions_; | 639 QuicVersionVector allowed_supported_versions_; |
| 629 // This vector contains QUIC versions which are currently supported based | 640 // This vector contains QUIC versions which are currently supported based |
| 630 // on flags. | 641 // on flags. |
| 631 QuicVersionVector filtered_supported_versions_; | 642 QuicVersionVector filtered_supported_versions_; |
| 632 }; | 643 }; |
| 633 | 644 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 QuicPathId path_id; | 753 QuicPathId path_id; |
| 743 bool has_crypto_handshake; | 754 bool has_crypto_handshake; |
| 744 int num_padding_bytes; | 755 int num_padding_bytes; |
| 745 EncryptionLevel encryption_level; | 756 EncryptionLevel encryption_level; |
| 746 QuicPacketNumberLength packet_number_length; | 757 QuicPacketNumberLength packet_number_length; |
| 747 }; | 758 }; |
| 748 | 759 |
| 749 } // namespace net | 760 } // namespace net |
| 750 | 761 |
| 751 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 762 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |