| 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/quic_protocol.h" | 5 #include "net/quic/quic_protocol.h" | 
| 6 | 6 | 
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" | 
| 8 #include "net/quic/quic_flags.h" | 8 #include "net/quic/quic_flags.h" | 
| 9 #include "net/quic/quic_utils.h" | 9 #include "net/quic/quic_utils.h" | 
| 10 | 10 | 
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 727                                    bool has_stop_waiting) | 727                                    bool has_stop_waiting) | 
| 728     : encrypted_buffer(encrypted_buffer), | 728     : encrypted_buffer(encrypted_buffer), | 
| 729       encrypted_length(encrypted_length), | 729       encrypted_length(encrypted_length), | 
| 730       has_crypto_handshake(NOT_HANDSHAKE), | 730       has_crypto_handshake(NOT_HANDSHAKE), | 
| 731       needs_padding(false), | 731       needs_padding(false), | 
| 732       path_id(path_id), | 732       path_id(path_id), | 
| 733       packet_number(packet_number), | 733       packet_number(packet_number), | 
| 734       packet_number_length(packet_number_length), | 734       packet_number_length(packet_number_length), | 
| 735       encryption_level(ENCRYPTION_NONE), | 735       encryption_level(ENCRYPTION_NONE), | 
| 736       entropy_hash(entropy_hash), | 736       entropy_hash(entropy_hash), | 
| 737       is_fec_packet(false), |  | 
| 738       has_ack(has_ack), | 737       has_ack(has_ack), | 
| 739       has_stop_waiting(has_stop_waiting), | 738       has_stop_waiting(has_stop_waiting), | 
| 740       original_packet_number(0), | 739       original_packet_number(0), | 
| 741       transmission_type(NOT_RETRANSMISSION) {} | 740       transmission_type(NOT_RETRANSMISSION) {} | 
| 742 | 741 | 
| 743 SerializedPacket::SerializedPacket(const SerializedPacket& other) = default; | 742 SerializedPacket::SerializedPacket(const SerializedPacket& other) = default; | 
| 744 | 743 | 
| 745 SerializedPacket::~SerializedPacket() {} | 744 SerializedPacket::~SerializedPacket() {} | 
| 746 | 745 | 
| 747 QuicEncryptedPacket* QuicEncryptedPacket::Clone() const { | 746 QuicEncryptedPacket* QuicEncryptedPacket::Clone() const { | 
| 748   char* buffer = new char[this->length()]; | 747   char* buffer = new char[this->length()]; | 
| 749   memcpy(buffer, this->data(), this->length()); | 748   memcpy(buffer, this->data(), this->length()); | 
| 750   return new QuicEncryptedPacket(buffer, this->length(), true); | 749   return new QuicEncryptedPacket(buffer, this->length(), true); | 
| 751 } | 750 } | 
| 752 | 751 | 
| 753 ostream& operator<<(ostream& os, const QuicEncryptedPacket& s) { | 752 ostream& operator<<(ostream& os, const QuicEncryptedPacket& s) { | 
| 754   os << s.length() << "-byte data"; | 753   os << s.length() << "-byte data"; | 
| 755   return os; | 754   return os; | 
| 756 } | 755 } | 
| 757 | 756 | 
| 758 TransmissionInfo::TransmissionInfo() | 757 TransmissionInfo::TransmissionInfo() | 
| 759     : encryption_level(ENCRYPTION_NONE), | 758     : encryption_level(ENCRYPTION_NONE), | 
| 760       packet_number_length(PACKET_1BYTE_PACKET_NUMBER), | 759       packet_number_length(PACKET_1BYTE_PACKET_NUMBER), | 
| 761       bytes_sent(0), | 760       bytes_sent(0), | 
| 762       nack_count(0), | 761       nack_count(0), | 
| 763       sent_time(QuicTime::Zero()), | 762       sent_time(QuicTime::Zero()), | 
| 764       transmission_type(NOT_RETRANSMISSION), | 763       transmission_type(NOT_RETRANSMISSION), | 
| 765       in_flight(false), | 764       in_flight(false), | 
| 766       is_unackable(false), | 765       is_unackable(false), | 
| 767       is_fec_packet(false), |  | 
| 768       has_crypto_handshake(false), | 766       has_crypto_handshake(false), | 
| 769       needs_padding(false), | 767       needs_padding(false), | 
| 770       retransmission(0) {} | 768       retransmission(0) {} | 
| 771 | 769 | 
| 772 TransmissionInfo::TransmissionInfo(EncryptionLevel level, | 770 TransmissionInfo::TransmissionInfo(EncryptionLevel level, | 
| 773                                    QuicPacketNumberLength packet_number_length, | 771                                    QuicPacketNumberLength packet_number_length, | 
| 774                                    TransmissionType transmission_type, | 772                                    TransmissionType transmission_type, | 
| 775                                    QuicTime sent_time, | 773                                    QuicTime sent_time, | 
| 776                                    QuicPacketLength bytes_sent, | 774                                    QuicPacketLength bytes_sent, | 
| 777                                    bool is_fec_packet, |  | 
| 778                                    bool has_crypto_handshake, | 775                                    bool has_crypto_handshake, | 
| 779                                    bool needs_padding) | 776                                    bool needs_padding) | 
| 780     : encryption_level(level), | 777     : encryption_level(level), | 
| 781       packet_number_length(packet_number_length), | 778       packet_number_length(packet_number_length), | 
| 782       bytes_sent(bytes_sent), | 779       bytes_sent(bytes_sent), | 
| 783       nack_count(0), | 780       nack_count(0), | 
| 784       sent_time(sent_time), | 781       sent_time(sent_time), | 
| 785       transmission_type(transmission_type), | 782       transmission_type(transmission_type), | 
| 786       in_flight(false), | 783       in_flight(false), | 
| 787       is_unackable(false), | 784       is_unackable(false), | 
| 788       is_fec_packet(is_fec_packet), |  | 
| 789       has_crypto_handshake(has_crypto_handshake), | 785       has_crypto_handshake(has_crypto_handshake), | 
| 790       needs_padding(needs_padding), | 786       needs_padding(needs_padding), | 
| 791       retransmission(0) {} | 787       retransmission(0) {} | 
| 792 | 788 | 
| 793 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 789 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 
| 794 | 790 | 
| 795 TransmissionInfo::~TransmissionInfo() {} | 791 TransmissionInfo::~TransmissionInfo() {} | 
| 796 | 792 | 
| 797 }  // namespace net | 793 }  // namespace net | 
| OLD | NEW | 
|---|