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 #include "net/quic/crypto/proof_verifier.h" | 8 #include "net/quic/crypto/proof_verifier.h" |
9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
10 #include "net/quic/quic_flow_controller.h" | 10 #include "net/quic/quic_flow_controller.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // Tell the stream that a RST has been sent. | 405 // Tell the stream that a RST has been sent. |
406 if (locally_reset) { | 406 if (locally_reset) { |
407 stream->set_rst_sent(true); | 407 stream->set_rst_sent(true); |
408 } | 408 } |
409 | 409 |
410 closed_streams_.push_back(it->second); | 410 closed_streams_.push_back(it->second); |
411 | 411 |
412 // If we haven't received a FIN or RST for this stream, we need to keep track | 412 // If we haven't received a FIN or RST for this stream, we need to keep track |
413 // of the how many bytes the stream's flow controller believes it has | 413 // of the how many bytes the stream's flow controller believes it has |
414 // received, for accurate connection level flow control accounting. | 414 // received, for accurate connection level flow control accounting. |
415 if (!stream->HasFinalReceivedByteOffset() && | 415 if (!stream->HasFinalReceivedByteOffset()) { |
416 stream->flow_controller()->IsEnabled()) { | |
417 locally_closed_streams_highest_offset_[stream_id] = | 416 locally_closed_streams_highest_offset_[stream_id] = |
418 stream->flow_controller()->highest_received_byte_offset(); | 417 stream->flow_controller()->highest_received_byte_offset(); |
419 } | 418 } |
420 | 419 |
421 stream_map_.erase(it); | 420 stream_map_.erase(it); |
422 stream->OnClose(); | 421 stream->OnClose(); |
423 // Decrease the number of streams being emulated when a new one is opened. | 422 // Decrease the number of streams being emulated when a new one is opened. |
424 connection_->SetNumOpenStreams(stream_map_.size()); | 423 connection_->SetNumOpenStreams(stream_map_.size()); |
425 } | 424 } |
426 | 425 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 for (DataStreamMap::iterator it = stream_map_.begin(); | 742 for (DataStreamMap::iterator it = stream_map_.begin(); |
744 it != stream_map_.end(); ++it) { | 743 it != stream_map_.end(); ++it) { |
745 if (it->second->flow_controller()->IsBlocked()) { | 744 if (it->second->flow_controller()->IsBlocked()) { |
746 return true; | 745 return true; |
747 } | 746 } |
748 } | 747 } |
749 return false; | 748 return false; |
750 } | 749 } |
751 | 750 |
752 } // namespace net | 751 } // namespace net |
OLD | NEW |