| 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/core/quic_session.h" |    5 #include "net/quic/core/quic_session.h" | 
|    6  |    6  | 
|    7 #include "base/memory/ptr_util.h" |    7 #include "base/memory/ptr_util.h" | 
|    8 #include "base/stl_util.h" |    8 #include "base/stl_util.h" | 
|    9 #include "base/strings/string_number_conversions.h" |    9 #include "base/strings/string_number_conversions.h" | 
|   10 #include "base/strings/stringprintf.h" |   10 #include "base/strings/stringprintf.h" | 
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  152   if (stream_id == kConnectionLevelId) { |  152   if (stream_id == kConnectionLevelId) { | 
|  153     // This is a window update that applies to the connection, rather than an |  153     // This is a window update that applies to the connection, rather than an | 
|  154     // individual stream. |  154     // individual stream. | 
|  155     DVLOG(1) << ENDPOINT << "Received connection level flow control window " |  155     DVLOG(1) << ENDPOINT << "Received connection level flow control window " | 
|  156                             "update with byte offset: " |  156                             "update with byte offset: " | 
|  157              << frame.byte_offset; |  157              << frame.byte_offset; | 
|  158     flow_controller_.UpdateSendWindowOffset(frame.byte_offset); |  158     flow_controller_.UpdateSendWindowOffset(frame.byte_offset); | 
|  159     return; |  159     return; | 
|  160   } |  160   } | 
|  161   ReliableQuicStream* stream = GetOrCreateStream(stream_id); |  161   ReliableQuicStream* stream = GetOrCreateStream(stream_id); | 
|  162   if (stream) { |  162   if (stream != nullptr) { | 
|  163     stream->OnWindowUpdateFrame(frame); |  163     stream->OnWindowUpdateFrame(frame); | 
|  164   } |  164   } | 
|  165 } |  165 } | 
|  166  |  166  | 
|  167 void QuicSession::OnBlockedFrame(const QuicBlockedFrame& frame) { |  167 void QuicSession::OnBlockedFrame(const QuicBlockedFrame& frame) { | 
|  168   // TODO(rjshade): Compare our flow control receive windows for specified |  168   // TODO(rjshade): Compare our flow control receive windows for specified | 
|  169   //                streams: if we have a large window then maybe something |  169   //                streams: if we have a large window then maybe something | 
|  170   //                had gone wrong with the flow control accounting. |  170   //                had gone wrong with the flow control accounting. | 
|  171   DVLOG(1) << ENDPOINT |  171   DVLOG(1) << ENDPOINT | 
|  172            << "Received BLOCKED frame with stream id: " << frame.stream_id; |  172            << "Received BLOCKED frame with stream id: " << frame.stream_id; | 
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  819  |  819  | 
|  820 size_t QuicSession::MaxAvailableStreams() const { |  820 size_t QuicSession::MaxAvailableStreams() const { | 
|  821   return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; |  821   return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; | 
|  822 } |  822 } | 
|  823  |  823  | 
|  824 bool QuicSession::IsIncomingStream(QuicStreamId id) const { |  824 bool QuicSession::IsIncomingStream(QuicStreamId id) const { | 
|  825   return id % 2 != next_outgoing_stream_id_ % 2; |  825   return id % 2 != next_outgoing_stream_id_ % 2; | 
|  826 } |  826 } | 
|  827  |  827  | 
|  828 }  // namespace net |  828 }  // namespace net | 
| OLD | NEW |