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

Unified Diff: net/quic/core/quic_version_manager.h

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_unacked_packet_map.cc ('k') | net/quic/core/quic_version_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_version_manager.h
diff --git a/net/quic/core/quic_version_manager.h b/net/quic/core/quic_version_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd8e9f95373f05ccfc27f3ec0b78a6c1793ed875
--- /dev/null
+++ b/net/quic/core/quic_version_manager.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_QUIC_CORE_QUIC_VERSION_MANAGER_H_
+#define NET_QUIC_CORE_QUIC_VERSION_MANAGER_H_
+
+#include "net/quic/core/quic_versions.h"
+
+namespace net {
+
+// Used to generate filtered supported versions based on flags.
+class NET_EXPORT_PRIVATE QuicVersionManager {
+ public:
+ explicit QuicVersionManager(QuicVersionVector supported_versions);
+ virtual ~QuicVersionManager();
+
+ // Returns currently supported QUIC versions.
+ const QuicVersionVector& GetSupportedVersions();
+
+ protected:
+ // Maybe refilter filtered_supported_versions_ based on flags.
+ void MaybeRefilterSupportedVersions();
+
+ // Refilters filtered_supported_versions_.
+ virtual void RefilterSupportedVersions();
+
+ const QuicVersionVector& filtered_supported_versions() const {
+ return filtered_supported_versions_;
+ }
+
+ private:
+ // FLAGS_quic_enable_version_36_v3
+ bool enable_version_36_;
+ // The list of versions that may be supported.
+ QuicVersionVector allowed_supported_versions_;
+ // This vector contains QUIC versions which are currently supported based on
+ // flags.
+ QuicVersionVector filtered_supported_versions_;
+};
+
+} // namespace net
+
+#endif // NET_QUIC_CORE_QUIC_VERSION_MANAGER_H_
« no previous file with comments | « net/quic/core/quic_unacked_packet_map.cc ('k') | net/quic/core/quic_version_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698