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

Side by Side Diff: net/quic/core/quic_version_manager.cc

Issue 2834723002: Landing Recent QUIC changes until Thu Apr 20 2017 (Closed)
Patch Set: Format Created 3 years, 8 months 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_version_manager_test.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) 2016 The Chromium Authors. All rights reserved. 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 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 #include "net/quic/core/quic_version_manager.h" 5 #include "net/quic/core/quic_version_manager.h"
6 6
7 #include "net/quic/core/quic_versions.h" 7 #include "net/quic/core/quic_versions.h"
8 #include "net/quic/platform/api/quic_flags.h" 8 #include "net/quic/platform/api/quic_flags.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions) 12 QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions)
13 : enable_version_39_(GetQuicFlag(FLAGS_quic_enable_version_39)), 13 : enable_version_39_(FLAGS_quic_enable_version_39),
14 enable_version_38_(FLAGS_quic_reloadable_flag_quic_enable_version_38), 14 enable_version_38_(FLAGS_quic_reloadable_flag_quic_enable_version_38),
15 allowed_supported_versions_(supported_versions), 15 allowed_supported_versions_(supported_versions),
16 filtered_supported_versions_( 16 filtered_supported_versions_(
17 FilterSupportedVersions(supported_versions)) {} 17 FilterSupportedVersions(supported_versions)) {}
18 18
19 QuicVersionManager::~QuicVersionManager() {} 19 QuicVersionManager::~QuicVersionManager() {}
20 20
21 const QuicVersionVector& QuicVersionManager::GetSupportedVersions() { 21 const QuicVersionVector& QuicVersionManager::GetSupportedVersions() {
22 MaybeRefilterSupportedVersions(); 22 MaybeRefilterSupportedVersions();
23 return filtered_supported_versions_; 23 return filtered_supported_versions_;
24 } 24 }
25 25
26 void QuicVersionManager::MaybeRefilterSupportedVersions() { 26 void QuicVersionManager::MaybeRefilterSupportedVersions() {
27 if (enable_version_39_ != GetQuicFlag(FLAGS_quic_enable_version_39) || 27 if (enable_version_39_ != FLAGS_quic_enable_version_39 ||
28 enable_version_38_ != FLAGS_quic_reloadable_flag_quic_enable_version_38) { 28 enable_version_38_ != FLAGS_quic_reloadable_flag_quic_enable_version_38) {
29 enable_version_39_ = GetQuicFlag(FLAGS_quic_enable_version_39); 29 enable_version_39_ = FLAGS_quic_enable_version_39;
30 enable_version_38_ = FLAGS_quic_reloadable_flag_quic_enable_version_38; 30 enable_version_38_ = FLAGS_quic_reloadable_flag_quic_enable_version_38;
31 RefilterSupportedVersions(); 31 RefilterSupportedVersions();
32 } 32 }
33 } 33 }
34 34
35 void QuicVersionManager::RefilterSupportedVersions() { 35 void QuicVersionManager::RefilterSupportedVersions() {
36 filtered_supported_versions_ = 36 filtered_supported_versions_ =
37 FilterSupportedVersions(allowed_supported_versions_); 37 FilterSupportedVersions(allowed_supported_versions_);
38 } 38 }
39 39
40 } // namespace net 40 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_version_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698