Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: net/quic/quic_multipath_transmissions_map.h

Issue 1465583002: Convert QuicPathIdPacketNumber struct to std::pair. Not used in production, no behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107452913
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 map manages packets which are transmitted across multiple paths. 5 // A map manages packets which are transmitted across multiple paths.
6 // For example, a packet is originally transmitted on path 1 with packet number 6 // For example, a packet is originally transmitted on path 1 with packet number
7 // 1. Then this packet is retransmitted on path 2 with packet number 1. (1, 1) 7 // 1. Then this packet is retransmitted on path 2 with packet number 1. (1, 1)
8 // and (2, 1) are inserted into this map. Suppose (2, 1) is detected lost and 8 // and (2, 1) are inserted into this map. Suppose (2, 1) is detected lost and
9 // gets retransmitted on path 2 with packet 2. (2, 2) will not be inserted 9 // gets retransmitted on path 2 with packet 2. (2, 2) will not be inserted
10 // because this transmission does not "across" path compared to (2, 1). 10 // because this transmission does not "across" path compared to (2, 1).
11 11
12 #ifndef NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_ 12 #ifndef NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
13 #define NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_ 13 #define NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
14 14
15 #include <deque> 15 #include <deque>
16 16
17 #include "base/containers/hash_tables.h" 17 #include "base/containers/hash_tables.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "net/quic/quic_protocol.h" 19 #include "net/quic/quic_protocol.h"
20 20
21 namespace net_quic { 21 namespace net_quic {
22 22
23 typedef std::pair<net::QuicPathId, net::QuicPacketNumber> 23 typedef std::pair<net::QuicPathId, net::QuicPacketNumber>
24 QuicPathIdPacketNumber; 24 QuicPathIdPacketNumber;
25 25
26 class NET_EXPORT_PRIVATE QuicMultipathTransmissionsMap { 26 class QuicMultipathTransmissionsMap {
Ryan Hamilton 2015/11/19 20:13:50 I'm pretty sure you don't want to remove this.
ianswett 2015/11/23 18:15:18 Done.
27 public: 27 public:
28 typedef std::deque<QuicPathIdPacketNumber> MultipathTransmissionsList; 28 typedef std::deque<QuicPathIdPacketNumber> MultipathTransmissionsList;
29 typedef base::hash_map<QuicPathIdPacketNumber, MultipathTransmissionsList*> 29 typedef base::hash_map<QuicPathIdPacketNumber, MultipathTransmissionsList*>
30 MultipathTransmissionsMap; 30 MultipathTransmissionsMap;
31 31
32 QuicMultipathTransmissionsMap(); 32 QuicMultipathTransmissionsMap();
33 ~QuicMultipathTransmissionsMap(); 33 ~QuicMultipathTransmissionsMap();
34 34
35 // Called when a packet is retransmitted on a different path. Adds both 35 // Called when a packet is retransmitted on a different path. Adds both
36 // |original_path_id_packet_number| (if not exists) and 36 // |original_path_id_packet_number| (if not exists) and
(...skipping 19 matching lines...) Expand all
56 // packet has been transmitted as (1, 1) and (2, 1), two entries are added 56 // packet has been transmitted as (1, 1) and (2, 1), two entries are added
57 // to this map and both values point to the same list: {(1, 1), (2, 1)}. 57 // to this map and both values point to the same list: {(1, 1), (2, 1)}.
58 // The MultipathTransmissionsList is owned by the transmission which is 58 // The MultipathTransmissionsList is owned by the transmission which is
59 // received first (on any path). 59 // received first (on any path).
60 MultipathTransmissionsMap transmission_map_; 60 MultipathTransmissionsMap transmission_map_;
61 }; 61 };
62 62
63 } // namespace net_quic 63 } // namespace net_quic
64 64
65 #endif // NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_ 65 #endif // NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698