OLD | NEW |
---|---|
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 #include "net/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
195 crypto_config_(crypto_config), | 195 crypto_config_(crypto_config), |
196 compressed_certs_cache_( | 196 compressed_certs_cache_( |
197 QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), | 197 QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), |
198 helper_(std::move(helper)), | 198 helper_(std::move(helper)), |
199 session_helper_(std::move(session_helper)), | 199 session_helper_(std::move(session_helper)), |
200 alarm_factory_(std::move(alarm_factory)), | 200 alarm_factory_(std::move(alarm_factory)), |
201 delete_sessions_alarm_( | 201 delete_sessions_alarm_( |
202 alarm_factory_->CreateAlarm(new DeleteSessionsAlarm(this))), | 202 alarm_factory_->CreateAlarm(new DeleteSessionsAlarm(this))), |
203 buffered_packets_(this, helper_->GetClock(), alarm_factory_.get()), | 203 buffered_packets_(this, helper_->GetClock(), alarm_factory_.get()), |
204 supported_versions_(supported_versions), | 204 supported_versions_(supported_versions), |
205 disable_quic_pre_30_(FLAGS_quic_disable_pre_30), | |
206 allowed_supported_versions_(supported_versions), | 205 allowed_supported_versions_(supported_versions), |
207 current_packet_(nullptr), | 206 current_packet_(nullptr), |
208 framer_(supported_versions, | 207 framer_(supported_versions, |
209 /*unused*/ QuicTime::Zero(), | 208 /*unused*/ QuicTime::Zero(), |
210 Perspective::IS_SERVER), | 209 Perspective::IS_SERVER), |
211 last_error_(QUIC_NO_ERROR) { | 210 last_error_(QUIC_NO_ERROR) { |
212 framer_.set_visitor(this); | 211 framer_.set_visitor(this); |
213 } | 212 } |
214 | 213 |
215 QuicDispatcher::~QuicDispatcher() { | 214 QuicDispatcher::~QuicDispatcher() { |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
734 return kFateTimeWait; | 733 return kFateTimeWait; |
735 } | 734 } |
736 } | 735 } |
737 | 736 |
738 QUIC_BUG << "Rejector has unknown invalid state."; | 737 QUIC_BUG << "Rejector has unknown invalid state."; |
739 return kFateDrop; | 738 return kFateDrop; |
740 } | 739 } |
741 | 740 |
742 const QuicVersionVector& QuicDispatcher::GetSupportedVersions() { | 741 const QuicVersionVector& QuicDispatcher::GetSupportedVersions() { |
743 // Filter (or un-filter) the list of supported versions based on the flag. | 742 // Filter (or un-filter) the list of supported versions based on the flag. |
744 if (disable_quic_pre_30_ != FLAGS_quic_disable_pre_30) { | 743 if (false) { |
745 DCHECK_EQ(supported_versions_.capacity(), | 744 DCHECK_EQ(supported_versions_.capacity(), |
746 allowed_supported_versions_.capacity()); | 745 allowed_supported_versions_.capacity()); |
747 disable_quic_pre_30_ = FLAGS_quic_disable_pre_30; | |
748 supported_versions_ = FilterSupportedVersions(allowed_supported_versions_); | 746 supported_versions_ = FilterSupportedVersions(allowed_supported_versions_); |
749 } | 747 } |
Zhongyi Shi
2016/07/25 22:52:49
nit: though this looks consistent with the interna
Ryan Hamilton
2016/07/25 23:07:34
'cause this code is going to come back RSN with v3
| |
750 return supported_versions_; | 748 return supported_versions_; |
751 } | 749 } |
752 | 750 |
753 } // namespace net | 751 } // namespace net |
OLD | NEW |