| 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_packet_generator.h" | 5 #include "net/quic/quic_packet_generator.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "net/quic/quic_fec_group.h" | 9 #include "net/quic/quic_fec_group.h" |
| 10 #include "net/quic/quic_utils.h" | 10 #include "net/quic/quic_utils.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 break; | 77 break; |
| 78 case PING_FRAME: | 78 case PING_FRAME: |
| 79 delete it->ping_frame; | 79 delete it->ping_frame; |
| 80 break; | 80 break; |
| 81 case NUM_FRAME_TYPES: | 81 case NUM_FRAME_TYPES: |
| 82 DCHECK(false) << "Cannot delete type: " << it->type; | 82 DCHECK(false) << "Cannot delete type: " << it->type; |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 // NetworkChangeVisitor method. | |
| 88 void QuicPacketGenerator::OnCongestionWindowChange( | 87 void QuicPacketGenerator::OnCongestionWindowChange( |
| 89 QuicByteCount congestion_window) { | 88 QuicByteCount congestion_window) { |
| 90 packet_creator_.set_max_packets_per_fec_group( | 89 packet_creator_.set_max_packets_per_fec_group( |
| 91 static_cast<size_t>(kCongestionWindowMultiplierForFecGroupSize * | 90 static_cast<size_t>(kCongestionWindowMultiplierForFecGroupSize * |
| 92 congestion_window / kDefaultTCPMSS)); | 91 congestion_window / kDefaultTCPMSS)); |
| 93 } | 92 } |
| 94 | 93 |
| 95 void QuicPacketGenerator::SetShouldSendAck(bool also_send_feedback, | 94 void QuicPacketGenerator::SetShouldSendAck(bool also_send_feedback, |
| 96 bool also_send_stop_waiting) { | 95 bool also_send_stop_waiting) { |
| 97 should_send_ack_ = true; | 96 should_send_ack_ = true; |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID); | 394 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID); |
| 396 } | 395 } |
| 397 } | 396 } |
| 398 | 397 |
| 399 | 398 |
| 400 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) { | 399 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) { |
| 401 packet_creator_.set_encryption_level(level); | 400 packet_creator_.set_encryption_level(level); |
| 402 } | 401 } |
| 403 | 402 |
| 404 } // namespace net | 403 } // namespace net |
| OLD | NEW |