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

Unified Diff: net/quic/quic_multipath_transmissions_map.h

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_multipath_sent_packet_manager_test.cc ('k') | net/quic/quic_multipath_transmissions_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_multipath_transmissions_map.h
diff --git a/net/quic/quic_multipath_transmissions_map.h b/net/quic/quic_multipath_transmissions_map.h
deleted file mode 100644
index 203fb2853286718aa2c86ee779ab9671fc4619a2..0000000000000000000000000000000000000000
--- a/net/quic/quic_multipath_transmissions_map.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// A map manages packets which are transmitted across multiple paths.
-// For example, a packet is originally transmitted on path 1 with packet number
-// 1. Then this packet is retransmitted on path 2 with packet number 1. (1, 1)
-// and (2, 1) are inserted into this map. Suppose (2, 1) is detected lost and
-// gets retransmitted on path 2 with packet 2. (2, 2) will not be inserted
-// because this transmission does not "across" path compared to (2, 1).
-
-#ifndef NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
-#define NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
-
-#include <deque>
-#include <unordered_map>
-
-#include "base/macros.h"
-#include "net/quic/quic_protocol.h"
-#include "net/quic/quic_utils.h"
-
-namespace net {
-
-typedef std::pair<QuicPathId, QuicPacketNumber> QuicPathIdPacketNumber;
-
-class NET_EXPORT_PRIVATE QuicMultipathTransmissionsMap {
- public:
- struct QuicPathIdPacketNumberHash {
- size_t operator()(std::pair<QuicPathId, QuicPacketNumber> value) const {
- return QuicUtils::PackPathIdAndPacketNumber(value.first, value.second);
- }
- };
-
- typedef std::deque<QuicPathIdPacketNumber> MultipathTransmissionsList;
- typedef std::unordered_map<QuicPathIdPacketNumber,
- MultipathTransmissionsList*,
- QuicPathIdPacketNumberHash>
- MultipathTransmissionsMap;
-
- QuicMultipathTransmissionsMap();
- ~QuicMultipathTransmissionsMap();
-
- // Called when a packet is retransmitted on a different path. Adds both
- // |original_path_id_packet_number| (if not exists) and
- // |path_id_packet_number| to |transmission_map_|.
- void OnPacketRetransmittedOnDifferentPath(
- QuicPathIdPacketNumber original_path_id_packet_number,
- QuicPathIdPacketNumber path_id_packet_number);
-
- // Returns all multipath transmissions list if |path_id_packet_number| has
- // been transmitted across multiple paths, nullptr otherwise.
- const MultipathTransmissionsList* MaybeGetTransmissionsOnOtherPaths(
- QuicPathIdPacketNumber path_id_packet_number) const;
-
- // Called after packet |path_id_packet_number| is received.
- // If |path_id_packet_number| has been transmitted across multiple paths,
- // clears all multipath transmissions list and removes each transmission from
- // |transmission_map_|, does nothing otherwise.
- void OnPacketHandled(QuicPathIdPacketNumber path_id_packet_number);
-
- private:
- // Keys of the map are QuicPathIdPacketNumber, and values are pointers to
- // lists of multipath transmissions of the same packet. For example, if a
- // packet has been transmitted as (1, 1) and (2, 1), two entries are added
- // to this map and both values point to the same list: {(1, 1), (2, 1)}.
- // The MultipathTransmissionsList is owned by the transmission which is
- // received first (on any path).
- MultipathTransmissionsMap transmission_map_;
-};
-
-} // namespace net
-
-#endif // NET_QUIC_QUIC_MULTIPATH_TRANSMISSIONS_MAP_H_
« no previous file with comments | « net/quic/quic_multipath_sent_packet_manager_test.cc ('k') | net/quic/quic_multipath_transmissions_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698