| 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/quic/core/quic_protocol.h" | 5 #include "net/quic/core/quic_protocol.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "net/quic/core/quic_flags.h" | 9 #include "net/quic/core/quic_flags.h" |
| 10 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 | 611 |
| 612 QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions) | 612 QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions) |
| 613 : enable_version_36_(FLAGS_quic_enable_version_36_v3), | 613 : enable_version_36_(FLAGS_quic_enable_version_36_v3), |
| 614 allowed_supported_versions_(supported_versions), | 614 allowed_supported_versions_(supported_versions), |
| 615 filtered_supported_versions_( | 615 filtered_supported_versions_( |
| 616 FilterSupportedVersions(supported_versions)) {} | 616 FilterSupportedVersions(supported_versions)) {} |
| 617 | 617 |
| 618 QuicVersionManager::~QuicVersionManager() {} | 618 QuicVersionManager::~QuicVersionManager() {} |
| 619 | 619 |
| 620 const QuicVersionVector& QuicVersionManager::GetSupportedVersions() { | 620 const QuicVersionVector& QuicVersionManager::GetSupportedVersions() { |
| 621 if (enable_version_36_ != FLAGS_quic_enable_version_36_v3) { | 621 MaybeRefilterSupportedVersions(); |
| 622 enable_version_36_ = FLAGS_quic_enable_version_36_v3; | |
| 623 filtered_supported_versions_ = | |
| 624 FilterSupportedVersions(allowed_supported_versions_); | |
| 625 } | |
| 626 return filtered_supported_versions_; | 622 return filtered_supported_versions_; |
| 627 } | 623 } |
| 628 | 624 |
| 625 void QuicVersionManager::MaybeRefilterSupportedVersions() { |
| 626 if (enable_version_36_ != FLAGS_quic_enable_version_36_v3) { |
| 627 enable_version_36_ = FLAGS_quic_enable_version_36_v3; |
| 628 RefilterSupportedVersions(); |
| 629 } |
| 630 } |
| 631 |
| 632 void QuicVersionManager::RefilterSupportedVersions() { |
| 633 filtered_supported_versions_ = |
| 634 FilterSupportedVersions(allowed_supported_versions_); |
| 635 } |
| 636 |
| 629 AckListenerWrapper::AckListenerWrapper(QuicAckListenerInterface* listener, | 637 AckListenerWrapper::AckListenerWrapper(QuicAckListenerInterface* listener, |
| 630 QuicPacketLength data_length) | 638 QuicPacketLength data_length) |
| 631 : ack_listener(listener), length(data_length) { | 639 : ack_listener(listener), length(data_length) { |
| 632 DCHECK(listener != nullptr); | 640 DCHECK(listener != nullptr); |
| 633 } | 641 } |
| 634 | 642 |
| 635 AckListenerWrapper::AckListenerWrapper(const AckListenerWrapper& other) = | 643 AckListenerWrapper::AckListenerWrapper(const AckListenerWrapper& other) = |
| 636 default; | 644 default; |
| 637 | 645 |
| 638 AckListenerWrapper::~AckListenerWrapper() {} | 646 AckListenerWrapper::~AckListenerWrapper() {} |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 is_unackable(false), | 698 is_unackable(false), |
| 691 has_crypto_handshake(has_crypto_handshake), | 699 has_crypto_handshake(has_crypto_handshake), |
| 692 num_padding_bytes(num_padding_bytes), | 700 num_padding_bytes(num_padding_bytes), |
| 693 retransmission(0) {} | 701 retransmission(0) {} |
| 694 | 702 |
| 695 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 703 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; |
| 696 | 704 |
| 697 TransmissionInfo::~TransmissionInfo() {} | 705 TransmissionInfo::~TransmissionInfo() {} |
| 698 | 706 |
| 699 } // namespace net | 707 } // namespace net |
| OLD | NEW |