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

Unified Diff: net/quic/core/quic_protocol.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_protocol.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_protocol.cc
diff --git a/net/quic/core/quic_protocol.cc b/net/quic/core/quic_protocol.cc
index 0faea1a367c9fecdb69ada63e5fef4abe78ad484..b074cd1a36689449c7865f64187fe26d473c88b0 100644
--- a/net/quic/core/quic_protocol.cc
+++ b/net/quic/core/quic_protocol.cc
@@ -618,12 +618,20 @@ QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions)
QuicVersionManager::~QuicVersionManager() {}
const QuicVersionVector& QuicVersionManager::GetSupportedVersions() {
+ MaybeRefilterSupportedVersions();
+ return filtered_supported_versions_;
+}
+
+void QuicVersionManager::MaybeRefilterSupportedVersions() {
if (enable_version_36_ != FLAGS_quic_enable_version_36_v3) {
enable_version_36_ = FLAGS_quic_enable_version_36_v3;
- filtered_supported_versions_ =
- FilterSupportedVersions(allowed_supported_versions_);
+ RefilterSupportedVersions();
}
- return filtered_supported_versions_;
+}
+
+void QuicVersionManager::RefilterSupportedVersions() {
+ filtered_supported_versions_ =
+ FilterSupportedVersions(allowed_supported_versions_);
}
AckListenerWrapper::AckListenerWrapper(QuicAckListenerInterface* listener,
« no previous file with comments | « net/quic/core/quic_protocol.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698