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

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

Issue 2338713003: Deprecate FLAGS_quic_close_stream_after_writing_queued_data (Closed)
Patch Set: Created 4 years, 3 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_flags_list.h ('k') | net/quic/core/quic_spdy_stream_test.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_spdy_stream.h" 5 #include "net/quic/core/quic_spdy_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // so we need to ensure we don't call it again. 352 // so we need to ensure we don't call it again.
353 visitor_ = nullptr; 353 visitor_ = nullptr;
354 visitor->OnClose(this); 354 visitor->OnClose(this);
355 } 355 }
356 } 356 }
357 357
358 void QuicSpdyStream::OnCanWrite() { 358 void QuicSpdyStream::OnCanWrite() {
359 ReliableQuicStream::OnCanWrite(); 359 ReliableQuicStream::OnCanWrite();
360 360
361 // Trailers (and hence a FIN) may have been sent ahead of queued body bytes. 361 // Trailers (and hence a FIN) may have been sent ahead of queued body bytes.
362 if (FLAGS_quic_close_stream_after_writing_queued_data && !HasBufferedData() && 362 if (!HasBufferedData() && fin_sent()) {
363 fin_sent()) {
364 CloseWriteSide(); 363 CloseWriteSide();
365 } 364 }
366 } 365 }
367 366
368 bool QuicSpdyStream::FinishedReadingHeaders() const { 367 bool QuicSpdyStream::FinishedReadingHeaders() const {
369 return headers_decompressed_ && decompressed_headers_.empty() && 368 return headers_decompressed_ && decompressed_headers_.empty() &&
370 header_list_.empty(); 369 header_list_.empty();
371 } 370 }
372 371
373 bool QuicSpdyStream::ParseHeaderStatusCode(const SpdyHeaderBlock& header, 372 bool QuicSpdyStream::ParseHeaderStatusCode(const SpdyHeaderBlock& header,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 if (spdy_session_->headers_stream() != nullptr && 418 if (spdy_session_->headers_stream() != nullptr &&
420 spdy_session_->force_hol_blocking()) { 419 spdy_session_->force_hol_blocking()) {
421 return spdy_session_->headers_stream()->WritevStreamData( 420 return spdy_session_->headers_stream()->WritevStreamData(
422 id(), iov, offset, fin, ack_notifier_delegate); 421 id(), iov, offset, fin, ack_notifier_delegate);
423 } 422 }
424 return ReliableQuicStream::WritevDataInner(iov, offset, fin, 423 return ReliableQuicStream::WritevDataInner(iov, offset, fin,
425 ack_notifier_delegate); 424 ack_notifier_delegate);
426 } 425 }
427 426
428 } // namespace net 427 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_spdy_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698