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

Unified Diff: net/quic/quic_ack_notifier_manager.h

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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_ack_notifier.cc ('k') | net/quic/quic_ack_notifier_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_ack_notifier_manager.h
diff --git a/net/quic/quic_ack_notifier_manager.h b/net/quic/quic_ack_notifier_manager.h
index 122bda1521f2ee0de2470fcd595f04e1e8909aaf..bf4d574f2431d62cb74a2db7e1debd617ae43fbf 100644
--- a/net/quic/quic_ack_notifier_manager.h
+++ b/net/quic/quic_ack_notifier_manager.h
@@ -5,6 +5,7 @@
#ifndef NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_
#define NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_
+#include <list>
#include <map>
#include "base/containers/hash_tables.h"
@@ -34,8 +35,9 @@ class NET_EXPORT_PRIVATE AckNotifierManager {
// If a packet has been retransmitted with a new sequence number, then this
// will be called. It updates the mapping in ack_notifier_map_, and also
// updates the internal set of sequence numbers in each matching AckNotifier.
- void UpdateSequenceNumber(QuicPacketSequenceNumber old_sequence_number,
- QuicPacketSequenceNumber new_sequence_number);
+ void OnPacketRetransmitted(QuicPacketSequenceNumber old_sequence_number,
+ QuicPacketSequenceNumber new_sequence_number,
+ int packet_payload_size);
// This is called after a packet has been serialized, is ready to be sent, and
// contains retransmittable frames (which may have associated AckNotifiers).
@@ -45,8 +47,11 @@ class NET_EXPORT_PRIVATE AckNotifierManager {
void OnSerializedPacket(const SerializedPacket& serialized_packet);
private:
+ typedef std::list<QuicAckNotifier*> AckNotifierList;
typedef base::hash_set<QuicAckNotifier*> AckNotifierSet;
- typedef std::map<QuicPacketSequenceNumber, AckNotifierSet> AckNotifierMap;
+ // TODO(ianswett): Further improvement may come from changing this to a deque.
+ typedef base::hash_map<QuicPacketSequenceNumber, AckNotifierList>
+ AckNotifierMap;
// On every ACK frame received by the connection, all the ack_notifiers_ will
// be told which sequeunce numbers were ACKed.
« no previous file with comments | « net/quic/quic_ack_notifier.cc ('k') | net/quic/quic_ack_notifier_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698