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

Unified Diff: net/quic/quic_fec_group.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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_end_to_end_unittest.cc ('k') | net/quic/quic_fec_group.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_fec_group.h
diff --git a/net/quic/quic_fec_group.h b/net/quic/quic_fec_group.h
deleted file mode 100644
index 718d09f83ad6a1008d9061e35bc815ba9fdebb0c..0000000000000000000000000000000000000000
--- a/net/quic/quic_fec_group.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2012 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.
-//
-// Tracks information about an FEC group, including the packets
-// that have been seen, and the running parity. Provided the ability
-// to revive a dropped packet.
-
-#ifndef NET_QUIC_QUIC_FEC_GROUP_H_
-#define NET_QUIC_QUIC_FEC_GROUP_H_
-
-#include "base/strings/string_piece.h"
-#include "net/quic/quic_protocol.h"
-
-namespace net {
-
-class NET_EXPORT_PRIVATE QuicFecGroup {
- public:
- QuicFecGroup();
- ~QuicFecGroup();
-
- // Updates the FEC group based on the delivery of a data packet decrypted at
- // |encryption_level|. Returns false if this packet has already been seen,
- // true otherwise.
- bool Update(EncryptionLevel encryption_level,
- const QuicPacketHeader& header,
- base::StringPiece decrypted_payload);
-
- // Updates the FEC group based on the delivery of an FEC packet decrypted at
- // |encryption_level|. Returns false if this packet has already been seen or
- // if it does not claim to protect all the packets previously seen in this
- // group.
- bool UpdateFec(EncryptionLevel encryption_level,
- QuicPacketSequenceNumber fec_packet_sequence_number,
- const QuicFecData& fec);
-
- // Returns true if a packet can be revived from this FEC group.
- bool CanRevive() const;
-
- // Returns true if all packets (FEC and data) from this FEC group have been
- // seen or revived
- bool IsFinished() const;
-
- // Revives the missing packet from this FEC group. This may return a packet
- // that is null padded to a greater length than the original packet, but
- // the framer will handle it correctly. Returns the length of the data
- // written to |decrypted_payload|, or 0 if the packet could not be revived.
- size_t Revive(QuicPacketHeader* header,
- char* decrypted_payload,
- size_t decrypted_payload_len);
-
- // Returns true of this FEC group protects any packets with sequence
- // numbers less than |num|.
- bool ProtectsPacketsBefore(QuicPacketSequenceNumber num) const;
-
- const base::StringPiece payload_parity() const {
- return base::StringPiece(payload_parity_, payload_parity_len_);
- }
-
- QuicPacketSequenceNumber min_protected_packet() const {
- return min_protected_packet_;
- }
-
- size_t NumReceivedPackets() const {
- return received_packets_.size();
- }
-
- // Returns the effective encryption level of the FEC group.
- EncryptionLevel effective_encryption_level() const {
- return effective_encryption_level_;
- }
-
- private:
- bool UpdateParity(base::StringPiece payload);
- // Returns the number of missing packets, or size_t max if the number
- // of missing packets is not known.
- size_t NumMissingPackets() const;
-
- // Set of packets that we have recevied.
- SequenceNumberSet received_packets_;
- // Sequence number of the first protected packet in this group (the one
- // with the lowest packet sequence number). Will only be set once the FEC
- // packet has been seen.
- QuicPacketSequenceNumber min_protected_packet_;
- // Sequence number of the last protected packet in this group (the one
- // with the highest packet sequence number). Will only be set once the FEC
- // packet has been seen.
- QuicPacketSequenceNumber max_protected_packet_;
- // The cumulative parity calculation of all received packets.
- char payload_parity_[kMaxPacketSize];
- size_t payload_parity_len_;
- // The effective encryption level, which is the lowest encryption level of
- // the data and FEC in the group.
- EncryptionLevel effective_encryption_level_;
-
- DISALLOW_COPY_AND_ASSIGN(QuicFecGroup);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_QUIC_FEC_GROUP_H_
« no previous file with comments | « net/quic/quic_end_to_end_unittest.cc ('k') | net/quic/quic_fec_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698