| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/core/quic_flow_controller.h" | 5 #include "net/quic/core/quic_flow_controller.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "net/quic/core/quic_bug_tracker.h" | 8 #include "net/quic/core/quic_bug_tracker.h" |
| 9 #include "net/quic/core/quic_connection.h" | 9 #include "net/quic/core/quic_connection.h" |
| 10 #include "net/quic/core/quic_flags.h" | 10 #include "net/quic/core/quic_flags.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); | 84 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 | 87 |
| 88 bytes_sent_ += bytes_sent; | 88 bytes_sent_ += bytes_sent; |
| 89 DVLOG(1) << ENDPOINT << "Stream " << id_ << " sent: " << bytes_sent_; | 89 DVLOG(1) << ENDPOINT << "Stream " << id_ << " sent: " << bytes_sent_; |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool QuicFlowController::FlowControlViolation() { | 92 bool QuicFlowController::FlowControlViolation() { |
| 93 if (highest_received_byte_offset_ > receive_window_offset_) { | 93 if (highest_received_byte_offset_ > receive_window_offset_) { |
| 94 LOG(ERROR) << ENDPOINT << "Flow control violation on stream " << id_ | 94 DLOG(INFO) << ENDPOINT << "Flow control violation on stream " << id_ |
| 95 << ", receive window offset: " << receive_window_offset_ | 95 << ", receive window offset: " << receive_window_offset_ |
| 96 << ", highest received byte offset: " | 96 << ", highest received byte offset: " |
| 97 << highest_received_byte_offset_; | 97 << highest_received_byte_offset_; |
| 98 return true; | 98 return true; |
| 99 } | 99 } |
| 100 return false; | 100 return false; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void QuicFlowController::MaybeIncreaseMaxWindowSize() { | 103 void QuicFlowController::MaybeIncreaseMaxWindowSize() { |
| 104 // Core of receive window auto tuning. This method should be called before a | 104 // Core of receive window auto tuning. This method should be called before a |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 if (receive_window_size_ != receive_window_offset_) { | 245 if (receive_window_size_ != receive_window_offset_) { |
| 246 QUIC_BUG << "receive_window_size_:" << receive_window_size_ | 246 QUIC_BUG << "receive_window_size_:" << receive_window_size_ |
| 247 << " != receive_window_offset:" << receive_window_offset_; | 247 << " != receive_window_offset:" << receive_window_offset_; |
| 248 return; | 248 return; |
| 249 } | 249 } |
| 250 receive_window_size_ = size; | 250 receive_window_size_ = size; |
| 251 receive_window_offset_ = size; | 251 receive_window_offset_ = size; |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace net | 254 } // namespace net |
| OLD | NEW |