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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 | 603 |
604 StringPiece QuicPacket::Plaintext(QuicVersion version) const { | 604 StringPiece QuicPacket::Plaintext(QuicVersion version) const { |
605 const size_t start_of_encrypted_data = GetStartOfEncryptedData( | 605 const size_t start_of_encrypted_data = GetStartOfEncryptedData( |
606 version, connection_id_length_, includes_version_, includes_path_id_, | 606 version, connection_id_length_, includes_version_, includes_path_id_, |
607 includes_diversification_nonce_, packet_number_length_); | 607 includes_diversification_nonce_, packet_number_length_); |
608 return StringPiece(data() + start_of_encrypted_data, | 608 return StringPiece(data() + start_of_encrypted_data, |
609 length() - start_of_encrypted_data); | 609 length() - start_of_encrypted_data); |
610 } | 610 } |
611 | 611 |
612 QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions) | 612 QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions) |
613 : enable_version_35_(FLAGS_quic_enable_version_35), | 613 : enable_version_36_(FLAGS_quic_enable_version_36_v2), |
614 enable_version_36_(FLAGS_quic_enable_version_36_v2), | |
615 allowed_supported_versions_(supported_versions), | 614 allowed_supported_versions_(supported_versions), |
616 filtered_supported_versions_( | 615 filtered_supported_versions_( |
617 FilterSupportedVersions(supported_versions)) {} | 616 FilterSupportedVersions(supported_versions)) {} |
618 | 617 |
619 QuicVersionManager::~QuicVersionManager() {} | 618 QuicVersionManager::~QuicVersionManager() {} |
620 | 619 |
621 const QuicVersionVector& QuicVersionManager::GetSupportedVersions() { | 620 const QuicVersionVector& QuicVersionManager::GetSupportedVersions() { |
622 if (enable_version_35_ != FLAGS_quic_enable_version_35 || | 621 if (enable_version_36_ != FLAGS_quic_enable_version_36_v2) { |
623 enable_version_36_ != FLAGS_quic_enable_version_36_v2) { | |
624 enable_version_35_ = FLAGS_quic_enable_version_35; | |
625 enable_version_36_ = FLAGS_quic_enable_version_36_v2; | 622 enable_version_36_ = FLAGS_quic_enable_version_36_v2; |
626 filtered_supported_versions_ = | 623 filtered_supported_versions_ = |
627 FilterSupportedVersions(allowed_supported_versions_); | 624 FilterSupportedVersions(allowed_supported_versions_); |
628 } | 625 } |
629 return filtered_supported_versions_; | 626 return filtered_supported_versions_; |
630 } | 627 } |
631 | 628 |
632 AckListenerWrapper::AckListenerWrapper(QuicAckListenerInterface* listener, | 629 AckListenerWrapper::AckListenerWrapper(QuicAckListenerInterface* listener, |
633 QuicPacketLength data_length) | 630 QuicPacketLength data_length) |
634 : ack_listener(listener), length(data_length) { | 631 : ack_listener(listener), length(data_length) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 is_unackable(false), | 690 is_unackable(false), |
694 has_crypto_handshake(has_crypto_handshake), | 691 has_crypto_handshake(has_crypto_handshake), |
695 num_padding_bytes(num_padding_bytes), | 692 num_padding_bytes(num_padding_bytes), |
696 retransmission(0) {} | 693 retransmission(0) {} |
697 | 694 |
698 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 695 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; |
699 | 696 |
700 TransmissionInfo::~TransmissionInfo() {} | 697 TransmissionInfo::~TransmissionInfo() {} |
701 | 698 |
702 } // namespace net | 699 } // namespace net |
OLD | NEW |