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

Side by Side Diff: net/quic/test_tools/reliable_quic_stream_peer.cc

Issue 338623002: Added FEC policy per stream, which is translated to an FEC protection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/reliable_quic_stream_peer.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "net/quic/test_tools/reliable_quic_stream_peer.h" 5 #include "net/quic/test_tools/reliable_quic_stream_peer.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "net/quic/reliable_quic_stream.h" 9 #include "net/quic/reliable_quic_stream.h"
10 10
(...skipping 21 matching lines...) Expand all
32 // static 32 // static
33 bool ReliableQuicStreamPeer::FinSent(ReliableQuicStream* stream) { 33 bool ReliableQuicStreamPeer::FinSent(ReliableQuicStream* stream) {
34 return stream->fin_sent_; 34 return stream->fin_sent_;
35 } 35 }
36 36
37 // static 37 // static
38 bool ReliableQuicStreamPeer::RstSent(ReliableQuicStream* stream) { 38 bool ReliableQuicStreamPeer::RstSent(ReliableQuicStream* stream) {
39 return stream->rst_sent_; 39 return stream->rst_sent_;
40 } 40 }
41 41
42
43
44 // static 42 // static
45 uint32 ReliableQuicStreamPeer::SizeOfQueuedData(ReliableQuicStream* stream) { 43 uint32 ReliableQuicStreamPeer::SizeOfQueuedData(ReliableQuicStream* stream) {
46 uint32 total = 0; 44 uint32 total = 0;
47 std::list<ReliableQuicStream::PendingData>::iterator it = 45 std::list<ReliableQuicStream::PendingData>::iterator it =
48 stream->queued_data_.begin(); 46 stream->queued_data_.begin();
49 while (it != stream->queued_data_.end()) { 47 while (it != stream->queued_data_.end()) {
50 total += it->data.size(); 48 total += it->data.size();
51 ++it; 49 ++it;
52 } 50 }
53 return total; 51 return total;
54 } 52 }
55 53
54 // static
55 void ReliableQuicStreamPeer::SetFecPolicy(ReliableQuicStream* stream,
56 FecPolicy fec_policy) {
57 stream->set_fec_policy(fec_policy);
58 }
59
56 } // namespace test 60 } // namespace test
57 } // namespace net 61 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/reliable_quic_stream_peer.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698