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

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

Issue 2933773002: When a stream is created for a QUIC session to a server which has been (Closed)
Patch Set: Fix zhongyi's comments Created 3 years, 6 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 | « no previous file | net/quic/chromium/quic_network_transaction_unittest.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/chromium/quic_chromium_client_session.h" 5 #include "net/quic/chromium/quic_chromium_client_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 return ERR_CONNECTION_CLOSED; 721 return ERR_CONNECTION_CLOSED;
722 722
723 if (IsCryptoHandshakeConfirmed()) 723 if (IsCryptoHandshakeConfirmed())
724 return OK; 724 return OK;
725 725
726 waiting_for_confirmation_callbacks_.push_back(callback); 726 waiting_for_confirmation_callbacks_.push_back(callback);
727 return ERR_IO_PENDING; 727 return ERR_IO_PENDING;
728 } 728 }
729 729
730 int QuicChromiumClientSession::TryCreateStream(StreamRequest* request) { 730 int QuicChromiumClientSession::TryCreateStream(StreamRequest* request) {
731 if (stream_factory_ && stream_factory_->IsQuicBroken(this)) {
732 DVLOG(1) << "QUIC broken.";
733 return ERR_QUIC_PROTOCOL_ERROR;
734 }
735
731 if (goaway_received()) { 736 if (goaway_received()) {
732 DVLOG(1) << "Going away."; 737 DVLOG(1) << "Going away.";
733 return ERR_CONNECTION_CLOSED; 738 return ERR_CONNECTION_CLOSED;
734 } 739 }
735 740
736 if (!connection()->connected()) { 741 if (!connection()->connected()) {
737 DVLOG(1) << "Already closed."; 742 DVLOG(1) << "Already closed.";
738 return ERR_CONNECTION_CLOSED; 743 return ERR_CONNECTION_CLOSED;
739 } 744 }
740 745
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 } 1763 }
1759 1764
1760 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { 1765 size_t QuicChromiumClientSession::EstimateMemoryUsage() const {
1761 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's 1766 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's
1762 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and 1767 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and
1763 // unacked packet map. 1768 // unacked packet map.
1764 return base::trace_event::EstimateMemoryUsage(packet_readers_); 1769 return base::trace_event::EstimateMemoryUsage(packet_readers_);
1765 } 1770 }
1766 1771
1767 } // namespace net 1772 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698