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

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

Issue 355293003: Restrict QUIC session pool when channel ID is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 6 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 | Annotate | Revision Log
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_crypto_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "net/quic/crypto/crypto_protocol.h" 7 #include "net/quic/crypto/crypto_protocol.h"
8 #include "net/quic/crypto/crypto_utils.h" 8 #include "net/quic/crypto/crypto_utils.h"
9 #include "net/quic/crypto/null_encrypter.h" 9 #include "net/quic/crypto/null_encrypter.h"
10 #include "net/quic/quic_client_session_base.h" 10 #include "net/quic/quic_client_session_base.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool QuicCryptoClientStream::CryptoConnect() { 102 bool QuicCryptoClientStream::CryptoConnect() {
103 next_state_ = STATE_INITIALIZE; 103 next_state_ = STATE_INITIALIZE;
104 DoHandshakeLoop(NULL); 104 DoHandshakeLoop(NULL);
105 return true; 105 return true;
106 } 106 }
107 107
108 int QuicCryptoClientStream::num_sent_client_hellos() const { 108 int QuicCryptoClientStream::num_sent_client_hellos() const {
109 return num_client_hellos_; 109 return num_client_hellos_;
110 } 110 }
111 111
112 bool QuicCryptoClientStream::WasChannelIDSent() const {
113 return channel_id_key_.get() != NULL;
wtc 2014/07/01 23:00:15 Please add a TODO comment that we should replace t
Ryan Hamilton 2014/07/01 23:26:20 Done.
114 }
115
112 // kMaxClientHellos is the maximum number of times that we'll send a client 116 // kMaxClientHellos is the maximum number of times that we'll send a client
113 // hello. The value 3 accounts for: 117 // hello. The value 3 accounts for:
114 // * One failure due to an incorrect or missing source-address token. 118 // * One failure due to an incorrect or missing source-address token.
115 // * One failure due the server's certificate chain being unavailible and the 119 // * One failure due the server's certificate chain being unavailible and the
116 // server being unwilling to send it without a valid source-address token. 120 // server being unwilling to send it without a valid source-address token.
117 static const int kMaxClientHellos = 3; 121 static const int kMaxClientHellos = 3;
118 122
119 void QuicCryptoClientStream::DoHandshakeLoop( 123 void QuicCryptoClientStream::DoHandshakeLoop(
120 const CryptoHandshakeMessage* in) { 124 const CryptoHandshakeMessage* in) {
121 CryptoHandshakeMessage out; 125 CryptoHandshakeMessage out;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 454 }
451 } 455 }
452 return false; 456 return false;
453 } 457 }
454 458
455 QuicClientSessionBase* QuicCryptoClientStream::client_session() { 459 QuicClientSessionBase* QuicCryptoClientStream::client_session() {
456 return reinterpret_cast<QuicClientSessionBase*>(session()); 460 return reinterpret_cast<QuicClientSessionBase*>(session());
457 } 461 }
458 462
459 } // namespace net 463 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698