| OLD | NEW |
| 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_flow_controller.h" | 9 #include "net/quic/quic_flow_controller.h" |
| 10 #include "net/quic/quic_session.h" | 10 #include "net/quic/quic_session.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void WroteData(bool last_data) { | 73 void WroteData(bool last_data) { |
| 74 DCHECK(!wrote_last_data_); | 74 DCHECK(!wrote_last_data_); |
| 75 ++pending_acks_; | 75 ++pending_acks_; |
| 76 wrote_last_data_ = last_data; | 76 wrote_last_data_ = last_data; |
| 77 } | 77 } |
| 78 | 78 |
| 79 protected: | 79 protected: |
| 80 // Delegates are ref counted. | 80 // Delegates are ref counted. |
| 81 virtual ~ProxyAckNotifierDelegate() { | 81 virtual ~ProxyAckNotifierDelegate() OVERRIDE { |
| 82 } | 82 } |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 // Original delegate. delegate_->OnAckNotification will be called when: | 85 // Original delegate. delegate_->OnAckNotification will be called when: |
| 86 // wrote_last_data_ == true and pending_acks_ == 0 | 86 // wrote_last_data_ == true and pending_acks_ == 0 |
| 87 scoped_refptr<DelegateInterface> delegate_; | 87 scoped_refptr<DelegateInterface> delegate_; |
| 88 | 88 |
| 89 // Number of outstanding acks. | 89 // Number of outstanding acks. |
| 90 int pending_acks_; | 90 int pending_acks_; |
| 91 | 91 |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 connection_flow_controller_->AddBytesConsumed(bytes); | 486 connection_flow_controller_->AddBytesConsumed(bytes); |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 | 489 |
| 490 bool ReliableQuicStream::IsFlowControlBlocked() { | 490 bool ReliableQuicStream::IsFlowControlBlocked() { |
| 491 return flow_controller_.IsBlocked() || | 491 return flow_controller_.IsBlocked() || |
| 492 connection_flow_controller_->IsBlocked(); | 492 connection_flow_controller_->IsBlocked(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace net | 495 } // namespace net |
| OLD | NEW |