| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_multipath_received_packet_manager.h" | 5 #include "net/quic/core/quic_multipath_received_packet_manager.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 | 8 |
| 9 #include "net/quic/core/quic_bug_tracker.h" | 9 #include "net/quic/core/quic_bug_tracker.h" |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 << static_cast<uint32_t>(path_id); | 38 << static_cast<uint32_t>(path_id); |
| 39 return; | 39 return; |
| 40 } | 40 } |
| 41 | 41 |
| 42 delete manager; | 42 delete manager; |
| 43 path_managers_.erase(path_id); | 43 path_managers_.erase(path_id); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void QuicMultipathReceivedPacketManager::RecordPacketReceived( | 46 void QuicMultipathReceivedPacketManager::RecordPacketReceived( |
| 47 QuicPathId path_id, | 47 QuicPathId path_id, |
| 48 QuicByteCount bytes, | |
| 49 const QuicPacketHeader& header, | 48 const QuicPacketHeader& header, |
| 50 QuicTime receipt_time) { | 49 QuicTime receipt_time) { |
| 51 QuicReceivedPacketManager* manager = path_managers_[path_id]; | 50 QuicReceivedPacketManager* manager = path_managers_[path_id]; |
| 52 if (manager == nullptr) { | 51 if (manager == nullptr) { |
| 53 QUIC_BUG << "Received a packet on a non-existent path."; | 52 QUIC_BUG << "Received a packet on a non-existent path."; |
| 54 return; | 53 return; |
| 55 } | 54 } |
| 56 | 55 |
| 57 manager->RecordPacketReceived(bytes, header, receipt_time); | 56 manager->RecordPacketReceived(header, receipt_time); |
| 58 } | 57 } |
| 59 | 58 |
| 60 bool QuicMultipathReceivedPacketManager::IsMissing( | 59 bool QuicMultipathReceivedPacketManager::IsMissing( |
| 61 QuicPathId path_id, | 60 QuicPathId path_id, |
| 62 QuicPacketNumber packet_number) { | 61 QuicPacketNumber packet_number) { |
| 63 QuicReceivedPacketManager* manager = path_managers_[path_id]; | 62 QuicReceivedPacketManager* manager = path_managers_[path_id]; |
| 64 if (manager == nullptr) { | 63 if (manager == nullptr) { |
| 65 QUIC_BUG << "Check whether a packet is missing on a non-existent path."; | 64 QUIC_BUG << "Check whether a packet is missing on a non-existent path."; |
| 66 return true; | 65 return true; |
| 67 } | 66 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 if (manager == nullptr) { | 109 if (manager == nullptr) { |
| 111 QUIC_BUG | 110 QUIC_BUG |
| 112 << "Try to get peer_least_packet_awaiting_ack of a non-existent path."; | 111 << "Try to get peer_least_packet_awaiting_ack of a non-existent path."; |
| 113 return false; | 112 return false; |
| 114 } | 113 } |
| 115 | 114 |
| 116 return manager->peer_least_packet_awaiting_ack(); | 115 return manager->peer_least_packet_awaiting_ack(); |
| 117 } | 116 } |
| 118 | 117 |
| 119 } // namespace net | 118 } // namespace net |
| OLD | NEW |