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

Side by Side Diff: net/quic/quic_client_session.cc

Issue 12334063: Land recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more EXPECT_FALSE Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/quic_random.cc ('k') | net/quic/quic_client_session_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 (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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 QuicReliableClientStream* QuicClientSession::CreateOutgoingReliableStream() { 46 QuicReliableClientStream* QuicClientSession::CreateOutgoingReliableStream() {
47 if (!crypto_stream_.handshake_complete()) { 47 if (!crypto_stream_.handshake_complete()) {
48 DLOG(INFO) << "Crypto handshake not complete, no outgoing stream created."; 48 DLOG(INFO) << "Crypto handshake not complete, no outgoing stream created.";
49 return NULL; 49 return NULL;
50 } 50 }
51 if (GetNumOpenStreams() >= get_max_open_streams()) { 51 if (GetNumOpenStreams() >= get_max_open_streams()) {
52 DLOG(INFO) << "Failed to create a new outgoing stream. " 52 DLOG(INFO) << "Failed to create a new outgoing stream. "
53 << "Already " << GetNumOpenStreams() << " open."; 53 << "Already " << GetNumOpenStreams() << " open.";
54 return NULL; 54 return NULL;
55 } 55 }
56 if (goaway_received()) {
57 DLOG(INFO) << "Failed to create a new outgoing stream. "
58 << "Already received goaway.";
59 return NULL;
60 }
56 QuicReliableClientStream* stream = 61 QuicReliableClientStream* stream =
57 new QuicReliableClientStream(GetNextStreamId(), this, net_log_); 62 new QuicReliableClientStream(GetNextStreamId(), this, net_log_);
58 ActivateStream(stream); 63 ActivateStream(stream);
59 ++num_total_streams_; 64 ++num_total_streams_;
60 return stream; 65 return stream;
61 } 66 }
62 67
63 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { 68 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() {
64 return &crypto_stream_; 69 return &crypto_stream_;
65 }; 70 };
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 connection()->ProcessUdpPacket(local_address, peer_address, packet); 165 connection()->ProcessUdpPacket(local_address, peer_address, packet);
161 if (!connection()->connected()) { 166 if (!connection()->connected()) {
162 stream_factory_->OnSessionClose(this); 167 stream_factory_->OnSessionClose(this);
163 return; 168 return;
164 } 169 }
165 StartReading(); 170 StartReading();
166 } 171 }
167 } 172 }
168 173
169 } // namespace net 174 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_random.cc ('k') | net/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698