| OLD | NEW |
| 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_stream.h" | 5 #include "net/quic/quic_crypto_stream.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
| 11 #include "net/quic/crypto/crypto_utils.h" | 11 #include "net/quic/crypto/crypto_utils.h" |
| 12 #include "net/quic/quic_connection.h" | 12 #include "net/quic/quic_connection.h" |
| 13 #include "net/quic/quic_session.h" | 13 #include "net/quic/quic_session.h" |
| 14 #include "net/quic/quic_utils.h" | 14 #include "net/quic/quic_utils.h" |
| 15 | 15 |
| 16 using std::string; | 16 using std::string; |
| 17 using base::StringPiece; | 17 using base::StringPiece; |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 #define ENDPOINT (session()->is_server() ? "Server: " : " Client: ") | 21 #define ENDPOINT (session()->is_server() ? "Server: " : " Client: ") |
| 22 | 22 |
| 23 QuicCryptoStream::QuicCryptoStream(QuicSession* session) | 23 QuicCryptoStream::QuicCryptoStream(QuicSession* session) |
| 24 : ReliableQuicStream(kCryptoStreamId, session), | 24 : ReliableQuicStream(kCryptoStreamId, session), |
| 25 encryption_established_(false), | 25 encryption_established_(false), |
| 26 handshake_confirmed_(false) { | 26 handshake_confirmed_(false) { |
| 27 crypto_framer_.set_visitor(this); | 27 crypto_framer_.set_visitor(this); |
| 28 if (version() <= QUIC_VERSION_20) { | 28 if (version() < QUIC_VERSION_21) { |
| 29 // Prior to QUIC_VERSION_21 the crypto stream is not subject to any flow | 29 // Prior to QUIC_VERSION_21 the crypto stream is not subject to any flow |
| 30 // control. | 30 // control. |
| 31 DisableFlowControl(); | 31 DisableFlowControl(); |
| 32 } | 32 } |
| 33 // The crypto stream is exempt from connection level flow control. | 33 // The crypto stream is exempt from connection level flow control. |
| 34 DisableConnectionFlowControlForThisStream(); | 34 DisableConnectionFlowControlForThisStream(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void QuicCryptoStream::OnError(CryptoFramer* framer) { | 37 void QuicCryptoStream::OnError(CryptoFramer* framer) { |
| 38 DLOG(WARNING) << "Error processing crypto data: " | 38 DLOG(WARNING) << "Error processing crypto data: " |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 result_len, | 90 result_len, |
| 91 result); | 91 result); |
| 92 } | 92 } |
| 93 | 93 |
| 94 const QuicCryptoNegotiatedParameters& | 94 const QuicCryptoNegotiatedParameters& |
| 95 QuicCryptoStream::crypto_negotiated_params() const { | 95 QuicCryptoStream::crypto_negotiated_params() const { |
| 96 return crypto_negotiated_params_; | 96 return crypto_negotiated_params_; |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace net | 99 } // namespace net |
| OLD | NEW |