| 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/quic_session.h" | 5 #include "net/quic/quic_session.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #ifdef TEMP_INSTRUMENTATION_473893 | 8 #ifdef TEMP_INSTRUMENTATION_473893 |
| 9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
| 10 #endif | 10 #endif |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 void QuicSession::OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) { | 212 void QuicSession::OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) { |
| 213 // Stream may be closed by the time we receive a WINDOW_UPDATE, so we can't | 213 // Stream may be closed by the time we receive a WINDOW_UPDATE, so we can't |
| 214 // assume that it still exists. | 214 // assume that it still exists. |
| 215 QuicStreamId stream_id = frame.stream_id; | 215 QuicStreamId stream_id = frame.stream_id; |
| 216 if (stream_id == kConnectionLevelId) { | 216 if (stream_id == kConnectionLevelId) { |
| 217 // This is a window update that applies to the connection, rather than an | 217 // This is a window update that applies to the connection, rather than an |
| 218 // individual stream. | 218 // individual stream. |
| 219 DVLOG(1) << ENDPOINT << "Received connection level flow control window " | 219 DVLOG(1) << ENDPOINT << "Received connection level flow control window " |
| 220 "update with byte offset: " | 220 "update with byte offset: " |
| 221 << frame.byte_offset; | 221 << frame.byte_offset; |
| 222 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) { | 222 flow_controller_.UpdateSendWindowOffset(frame.byte_offset); |
| 223 // Connection level flow control window has increased, so blocked streams | |
| 224 // can write again. | |
| 225 // TODO(ianswett): I suspect this can be delayed until the packet | |
| 226 // processing is complete. | |
| 227 if (!FLAGS_quic_dont_write_when_flow_unblocked) { | |
| 228 OnCanWrite(); | |
| 229 } | |
| 230 } | |
| 231 return; | 223 return; |
| 232 } | 224 } |
| 233 ReliableQuicStream* stream = GetStream(stream_id); | 225 ReliableQuicStream* stream = GetStream(stream_id); |
| 234 if (stream) { | 226 if (stream) { |
| 235 stream->OnWindowUpdateFrame(frame); | 227 stream->OnWindowUpdateFrame(frame); |
| 236 } | 228 } |
| 237 } | 229 } |
| 238 | 230 |
| 239 void QuicSession::OnBlockedFrame(const QuicBlockedFrame& frame) { | 231 void QuicSession::OnBlockedFrame(const QuicBlockedFrame& frame) { |
| 240 // TODO(rjshade): Compare our flow control receive windows for specified | 232 // TODO(rjshade): Compare our flow control receive windows for specified |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 base::debug::StackTrace stack_trace = stack_trace_; | 761 base::debug::StackTrace stack_trace = stack_trace_; |
| 770 | 762 |
| 771 base::debug::Alias(&liveness); | 763 base::debug::Alias(&liveness); |
| 772 base::debug::Alias(&stack_trace); | 764 base::debug::Alias(&stack_trace); |
| 773 | 765 |
| 774 CHECK_EQ(ALIVE, liveness); | 766 CHECK_EQ(ALIVE, liveness); |
| 775 #endif | 767 #endif |
| 776 } | 768 } |
| 777 | 769 |
| 778 } // namespace net | 770 } // namespace net |
| OLD | NEW |