Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / net / quic / test_tools / reliable_quic_stream_peer.cc
index 5b69a30..6d1f112 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "net/quic/test_tools/reliable_quic_stream_peer.h"
 
+#include <list>
+
 #include "net/quic/reliable_quic_stream.h"
 
 namespace net {
@@ -37,5 +39,19 @@ bool ReliableQuicStreamPeer::RstSent(ReliableQuicStream* stream) {
   return stream->rst_sent_;
 }
 
+
+
+// static
+uint32 ReliableQuicStreamPeer::SizeOfQueuedData(ReliableQuicStream* stream) {
+  uint32 total = 0;
+  std::list<ReliableQuicStream::PendingData>::iterator it =
+      stream->queued_data_.begin();
+  while (it != stream->queued_data_.end()) {
+    total += it->data.size();
+    ++it;
+  }
+  return total;
+}
+
 }  // namespace test
 }  // namespace net