| 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 // A connection level received packet manager which manages multiple per path | 5 // A connection level received packet manager which manages multiple per path |
| 6 // received packet managers. | 6 // received packet managers. |
| 7 | 7 |
| 8 #ifndef NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_ | 8 #ifndef NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_ |
| 9 #define NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_ | 9 #define NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_ |
| 10 | 10 |
| 11 #include <unordered_map> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "net/quic/quic_protocol.h" | 14 #include "net/quic/quic_protocol.h" |
| 14 #include "net/quic/quic_received_packet_manager.h" | 15 #include "net/quic/quic_received_packet_manager.h" |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 | 18 |
| 18 namespace test { | 19 namespace test { |
| 19 class QuicMultipathReceivedPacketManagerPeer; | 20 class QuicMultipathReceivedPacketManagerPeer; |
| 20 } // namespace test | 21 } // namespace test |
| 21 | 22 |
| 22 class NET_EXPORT_PRIVATE QuicMultipathReceivedPacketManager { | 23 class NET_EXPORT_PRIVATE QuicMultipathReceivedPacketManager { |
| 23 public: | 24 public: |
| 24 typedef base::hash_map<QuicPathId, QuicReceivedPacketManager*> | 25 typedef std::unordered_map<QuicPathId, QuicReceivedPacketManager*> |
| 25 MultipathReceivedPacketManagerMap; | 26 MultipathReceivedPacketManagerMap; |
| 26 | 27 |
| 27 explicit QuicMultipathReceivedPacketManager(QuicConnectionStats* stats); | 28 explicit QuicMultipathReceivedPacketManager(QuicConnectionStats* stats); |
| 28 ~QuicMultipathReceivedPacketManager(); | 29 ~QuicMultipathReceivedPacketManager(); |
| 29 | 30 |
| 30 // Called when a new path with |path_id| is created. | 31 // Called when a new path with |path_id| is created. |
| 31 void OnPathCreated(QuicPathId path_id, QuicConnectionStats* stats); | 32 void OnPathCreated(QuicPathId path_id, QuicConnectionStats* stats); |
| 32 | 33 |
| 33 // Called when path with |path_id| is closed. | 34 // Called when path with |path_id| is closed. |
| 34 void OnPathClosed(QuicPathId path_id); | 35 void OnPathClosed(QuicPathId path_id); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 private: | 70 private: |
| 70 friend class test::QuicMultipathReceivedPacketManagerPeer; | 71 friend class test::QuicMultipathReceivedPacketManagerPeer; |
| 71 | 72 |
| 72 // Map mapping path id to path received packet manager. | 73 // Map mapping path id to path received packet manager. |
| 73 MultipathReceivedPacketManagerMap path_managers_; | 74 MultipathReceivedPacketManagerMap path_managers_; |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace net | 77 } // namespace net |
| 77 | 78 |
| 78 #endif // NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_ | 79 #endif // NET_QUIC_QUIC_MULTIPATH_RECEIVED_PACKET_MANAGER_H_ |
| OLD | NEW |