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

Side by Side Diff: net/quic/chromium/quic_http_stream.cc

Issue 2870453002: Make ReleaseStream() take a Delegate (Closed)
Patch Set: quic_chromium_client_session_test.cc Created 3 years, 7 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/chromium/quic_chromium_client_session_test.cc ('k') | no next file » | 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/chromium/quic_http_stream.h" 5 #include "net/quic/chromium/quic_http_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 base::Bind(&QuicHttpStream::OnIOComplete, weak_factory_.GetWeakPtr())); 590 base::Bind(&QuicHttpStream::OnIOComplete, weak_factory_.GetWeakPtr()));
591 } 591 }
592 592
593 int QuicHttpStream::DoRequestStreamComplete(int rv) { 593 int QuicHttpStream::DoRequestStreamComplete(int rv) {
594 DCHECK(rv == OK || !stream_); 594 DCHECK(rv == OK || !stream_);
595 if (rv != OK) { 595 if (rv != OK) {
596 session_error_ = rv; 596 session_error_ = rv;
597 return GetResponseStatus(); 597 return GetResponseStatus();
598 } 598 }
599 599
600 stream_ = quic_session()->ReleaseStream(); 600 stream_ = quic_session()->ReleaseStream(this);
601 stream_->SetDelegate(this);
602 if (request_info_->load_flags & LOAD_DISABLE_CONNECTION_MIGRATION) { 601 if (request_info_->load_flags & LOAD_DISABLE_CONNECTION_MIGRATION) {
603 stream_->DisableConnectionMigration(); 602 stream_->DisableConnectionMigration();
604 } 603 }
605 604
606 if (response_info_) { 605 if (response_info_) {
607 // This happens in the case of a asynchronous push rendezvous 606 // This happens in the case of a asynchronous push rendezvous
608 // that ultimately fails (e.g. vary failure). |response_info_| 607 // that ultimately fails (e.g. vary failure). |response_info_|
609 // non-null implies that |DoRequestStream()| was called via 608 // non-null implies that |DoRequestStream()| was called via
610 // |SendRequest()|. 609 // |SendRequest()|.
611 next_state_ = STATE_SET_REQUEST_PRIORITY; 610 next_state_ = STATE_SET_REQUEST_PRIORITY;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 quic_stream_error_ != QUIC_STREAM_CONNECTION_ERROR) { 831 quic_stream_error_ != QUIC_STREAM_CONNECTION_ERROR) {
833 return ERR_QUIC_PROTOCOL_ERROR; 832 return ERR_QUIC_PROTOCOL_ERROR;
834 } 833 }
835 834
836 DCHECK_NE(QUIC_HANDSHAKE_TIMEOUT, quic_connection_error_); 835 DCHECK_NE(QUIC_HANDSHAKE_TIMEOUT, quic_connection_error_);
837 836
838 return ERR_QUIC_PROTOCOL_ERROR; 837 return ERR_QUIC_PROTOCOL_ERROR;
839 } 838 }
840 839
841 } // namespace net 840 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698