Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: net/quic/core/quic_protocol.h

Issue 2512163004: Fix version manager that flip flag in-flight does not make supported versions change. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698