Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: net/quic/core/quic_stream.cc

Issue 2964583002: Landing Recent QUIC changes until Jun 27 19:50:48 2017 +0000 (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_spdy_session.cc ('k') | net/quic/core/spdy_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_stream.h" 5 #include "net/quic/core/quic_stream.h"
6 6
7 #include "net/quic/core/quic_flow_controller.h" 7 #include "net/quic/core/quic_flow_controller.h"
8 #include "net/quic/core/quic_session.h" 8 #include "net/quic/core/quic_session.h"
9 #include "net/quic/platform/api/quic_bug_tracker.h" 9 #include "net/quic/platform/api/quic_bug_tracker.h"
10 #include "net/quic/platform/api/quic_logging.h" 10 #include "net/quic/platform/api/quic_logging.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 session_->flow_controller()), 75 session_->flow_controller()),
76 connection_flow_controller_(session_->flow_controller()), 76 connection_flow_controller_(session_->flow_controller()),
77 stream_contributes_to_connection_flow_control_(true), 77 stream_contributes_to_connection_flow_control_(true),
78 busy_counter_(0), 78 busy_counter_(0),
79 add_random_padding_after_fin_(false), 79 add_random_padding_after_fin_(false),
80 ack_listener_(nullptr) { 80 ack_listener_(nullptr) {
81 SetFromConfig(); 81 SetFromConfig();
82 } 82 }
83 83
84 QuicStream::~QuicStream() { 84 QuicStream::~QuicStream() {
85 QUIC_DLOG_IF(WARNING, session_ != nullptr && 85 if (session_ != nullptr && session_->use_stream_notifier() &&
86 session_->use_stream_notifier() && 86 IsWaitingForAcks()) {
87 IsWaitingForAcks()) 87 QUIC_DVLOG(1)
88 << "Stream destroyed while waiting for acks."; 88 << ENDPOINT << "Stream " << id_
89 << " gets destroyed while waiting for acks. stream_bytes_outstanding = "
90 << stream_bytes_outstanding_
91 << ", fin_outstanding: " << fin_outstanding_;
92 }
89 } 93 }
90 94
91 void QuicStream::SetFromConfig() {} 95 void QuicStream::SetFromConfig() {}
92 96
93 void QuicStream::OnStreamFrame(const QuicStreamFrame& frame) { 97 void QuicStream::OnStreamFrame(const QuicStreamFrame& frame) {
94 DCHECK_EQ(frame.stream_id, id_); 98 DCHECK_EQ(frame.stream_id, id_);
95 99
96 DCHECK(!(read_side_closed_ && write_side_closed_)); 100 DCHECK(!(read_side_closed_ && write_side_closed_));
97 101
98 if (frame.fin) { 102 if (frame.fin) {
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 if (!IsWaitingForAcks()) { 535 if (!IsWaitingForAcks()) {
532 session_->OnStreamDoneWaitingForAcks(id_); 536 session_->OnStreamDoneWaitingForAcks(id_);
533 } 537 }
534 } 538 }
535 539
536 bool QuicStream::IsWaitingForAcks() const { 540 bool QuicStream::IsWaitingForAcks() const {
537 return stream_bytes_outstanding_ || fin_outstanding_; 541 return stream_bytes_outstanding_ || fin_outstanding_;
538 } 542 }
539 543
540 } // namespace net 544 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_spdy_session.cc ('k') | net/quic/core/spdy_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698