OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_QUIC_CORE_QUIC_VERSION_MANAGER_H_ |
| 6 #define NET_QUIC_CORE_QUIC_VERSION_MANAGER_H_ |
| 7 |
| 8 #include "net/quic/core/quic_versions.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 // Used to generate filtered supported versions based on flags. |
| 13 class NET_EXPORT_PRIVATE QuicVersionManager { |
| 14 public: |
| 15 explicit QuicVersionManager(QuicVersionVector supported_versions); |
| 16 virtual ~QuicVersionManager(); |
| 17 |
| 18 // Returns currently supported QUIC versions. |
| 19 const QuicVersionVector& GetSupportedVersions(); |
| 20 |
| 21 protected: |
| 22 // Maybe refilter filtered_supported_versions_ based on flags. |
| 23 void MaybeRefilterSupportedVersions(); |
| 24 |
| 25 // Refilters filtered_supported_versions_. |
| 26 virtual void RefilterSupportedVersions(); |
| 27 |
| 28 const QuicVersionVector& filtered_supported_versions() const { |
| 29 return filtered_supported_versions_; |
| 30 } |
| 31 |
| 32 private: |
| 33 // FLAGS_quic_enable_version_36_v3 |
| 34 bool enable_version_36_; |
| 35 // The list of versions that may be supported. |
| 36 QuicVersionVector allowed_supported_versions_; |
| 37 // This vector contains QUIC versions which are currently supported based on |
| 38 // flags. |
| 39 QuicVersionVector filtered_supported_versions_; |
| 40 }; |
| 41 |
| 42 } // namespace net |
| 43 |
| 44 #endif // NET_QUIC_CORE_QUIC_VERSION_MANAGER_H_ |
OLD | NEW |