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

Unified Diff: net/quic/quic_protocol.h

Issue 2192633002: Switch to PacketNumberQueue interval iteration and avoid allocations in new ACK frame generation. G… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128431128
Patch Set: Rebase 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_framer.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index d5e606301aa9e2a6c55e57c177870781e3a1bf9a..2b57eafc995b8f743022ad53f3c7506f2e4c4b68 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -894,6 +894,9 @@ struct NET_EXPORT_PRIVATE QuicStopWaitingFrame {
// larger new packet numbers are added, with the occasional random access.
class NET_EXPORT_PRIVATE PacketNumberQueue {
public:
+ using const_interval_iterator = IntervalSet<QuicPacketNumber>::const_iterator;
+ using const_reverse_interval_iterator =
+ IntervalSet<QuicPacketNumber>::const_reverse_iterator;
// TODO(jdorfman): remove const_iterator and change the callers to iterate
// over the intervals.
class NET_EXPORT_PRIVATE const_iterator
@@ -993,6 +996,12 @@ class NET_EXPORT_PRIVATE PacketNumberQueue {
std::ostream& os,
const PacketNumberQueue& q);
+ // Returns iterators over the packet number intervals.
+ const_interval_iterator begin_intervals() const;
+ const_interval_iterator end_intervals() const;
+ const_reverse_interval_iterator rbegin_intervals() const;
+ const_reverse_interval_iterator rend_intervals() const;
+
private:
IntervalSet<QuicPacketNumber> packet_number_intervals_;
};
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698