| 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" |
| 11 | 11 |
| 12 using base::StringPiece; | 12 using base::StringPiece; |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class QuicAckNotifier; | 16 class QuicAckNotifier; |
| 17 | 17 |
| 18 QuicPacketGenerator::QuicPacketGenerator(DelegateInterface* delegate, | 18 QuicPacketGenerator::QuicPacketGenerator(DelegateInterface* delegate, |
| 19 DebugDelegateInterface* debug_delegate, | 19 DebugDelegate* debug_delegate, |
| 20 QuicPacketCreator* creator) | 20 QuicPacketCreator* creator) |
| 21 : delegate_(delegate), | 21 : delegate_(delegate), |
| 22 debug_delegate_(debug_delegate), | 22 debug_delegate_(debug_delegate), |
| 23 packet_creator_(creator), | 23 packet_creator_(creator), |
| 24 batch_mode_(false), | 24 batch_mode_(false), |
| 25 should_send_ack_(false), | 25 should_send_ack_(false), |
| 26 should_send_feedback_(false), | 26 should_send_feedback_(false), |
| 27 should_send_stop_waiting_(false) { | 27 should_send_stop_waiting_(false) { |
| 28 } | 28 } |
| 29 | 29 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 if (packet_creator_->ShouldSendFec(false)) { | 278 if (packet_creator_->ShouldSendFec(false)) { |
| 279 // TODO(jri): SerializeFec can return a NULL packet, and this should | 279 // TODO(jri): SerializeFec can return a NULL packet, and this should |
| 280 // cause an early return, with a call to delegate_->OnPacketGenerationError. | 280 // cause an early return, with a call to delegate_->OnPacketGenerationError. |
| 281 SerializedPacket serialized_fec = packet_creator_->SerializeFec(); | 281 SerializedPacket serialized_fec = packet_creator_->SerializeFec(); |
| 282 DCHECK(serialized_fec.packet); | 282 DCHECK(serialized_fec.packet); |
| 283 delegate_->OnSerializedPacket(serialized_fec); | 283 delegate_->OnSerializedPacket(serialized_fec); |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 } // namespace net | 287 } // namespace net |
| OLD | NEW |