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

Side by Side Diff: net/quic/reliable_quic_stream.cc

Issue 241783002: Plumbs through delta_largest_observed from (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/quic_sent_packet_manager.cc ('k') | net/quic/reliable_quic_stream_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/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/iovector.h" 8 #include "net/quic/iovector.h"
9 #include "net/quic/quic_session.h" 9 #include "net/quic/quic_session.h"
10 #include "net/quic/quic_write_blocked_list.h" 10 #include "net/quic/quic_write_blocked_list.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 wrote_last_data_(false), 43 wrote_last_data_(false),
44 num_original_packets_(0), 44 num_original_packets_(0),
45 num_original_bytes_(0), 45 num_original_bytes_(0),
46 num_retransmitted_packets_(0), 46 num_retransmitted_packets_(0),
47 num_retransmitted_bytes_(0) { 47 num_retransmitted_bytes_(0) {
48 } 48 }
49 49
50 virtual void OnAckNotification(int num_original_packets, 50 virtual void OnAckNotification(int num_original_packets,
51 int num_original_bytes, 51 int num_original_bytes,
52 int num_retransmitted_packets, 52 int num_retransmitted_packets,
53 int num_retransmitted_bytes) OVERRIDE { 53 int num_retransmitted_bytes,
54 QuicTime::Delta delta_largest_observed)
55 OVERRIDE {
54 DCHECK_LT(0, pending_acks_); 56 DCHECK_LT(0, pending_acks_);
55 --pending_acks_; 57 --pending_acks_;
56 num_original_packets_ += num_original_packets; 58 num_original_packets_ += num_original_packets;
57 num_original_bytes_ += num_original_bytes; 59 num_original_bytes_ += num_original_bytes;
58 num_retransmitted_packets_ += num_retransmitted_packets; 60 num_retransmitted_packets_ += num_retransmitted_packets;
59 num_retransmitted_bytes_ += num_retransmitted_bytes; 61 num_retransmitted_bytes_ += num_retransmitted_bytes;
60 62
61 if (wrote_last_data_ && pending_acks_ == 0) { 63 if (wrote_last_data_ && pending_acks_ == 0) {
62 delegate_->OnAckNotification(num_original_packets_, 64 delegate_->OnAckNotification(num_original_packets_,
63 num_original_bytes_, 65 num_original_bytes_,
64 num_retransmitted_packets_, 66 num_retransmitted_packets_,
65 num_retransmitted_bytes_); 67 num_retransmitted_bytes_,
68 delta_largest_observed);
66 } 69 }
67 } 70 }
68 71
69 void WroteData(bool last_data) { 72 void WroteData(bool last_data) {
70 DCHECK(!wrote_last_data_); 73 DCHECK(!wrote_last_data_);
71 ++pending_acks_; 74 ++pending_acks_;
72 wrote_last_data_ = last_data; 75 wrote_last_data_ = last_data;
73 } 76 }
74 77
75 protected: 78 protected:
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 495
493 uint64 ReliableQuicStream::SendWindowSize() const { 496 uint64 ReliableQuicStream::SendWindowSize() const {
494 return flow_control_send_limit_ - stream_bytes_written(); 497 return flow_control_send_limit_ - stream_bytes_written();
495 } 498 }
496 499
497 uint64 ReliableQuicStream::TotalReceivedBytes() const { 500 uint64 ReliableQuicStream::TotalReceivedBytes() const {
498 return sequencer_.num_bytes_consumed() + sequencer_.num_bytes_buffered(); 501 return sequencer_.num_bytes_consumed() + sequencer_.num_bytes_buffered();
499 } 502 }
500 503
501 } // namespace net 504 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698