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 \ |
| 22 (session()->perspective() == Perspective::IS_SERVER ? "Server: " : "Client:" \ |
| 23 " ") |
22 | 24 |
23 QuicCryptoStream::QuicCryptoStream(QuicSession* session) | 25 QuicCryptoStream::QuicCryptoStream(QuicSession* session) |
24 : ReliableQuicStream(kCryptoStreamId, session), | 26 : ReliableQuicStream(kCryptoStreamId, session), |
25 encryption_established_(false), | 27 encryption_established_(false), |
26 handshake_confirmed_(false) { | 28 handshake_confirmed_(false) { |
27 crypto_framer_.set_visitor(this); | 29 crypto_framer_.set_visitor(this); |
28 // The crypto stream is exempt from connection level flow control. | 30 // The crypto stream is exempt from connection level flow control. |
29 DisableConnectionFlowControlForThisStream(); | 31 DisableConnectionFlowControlForThisStream(); |
30 } | 32 } |
31 | 33 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 result_len, | 87 result_len, |
86 result); | 88 result); |
87 } | 89 } |
88 | 90 |
89 const QuicCryptoNegotiatedParameters& | 91 const QuicCryptoNegotiatedParameters& |
90 QuicCryptoStream::crypto_negotiated_params() const { | 92 QuicCryptoStream::crypto_negotiated_params() const { |
91 return crypto_negotiated_params_; | 93 return crypto_negotiated_params_; |
92 } | 94 } |
93 | 95 |
94 } // namespace net | 96 } // namespace net |
OLD | NEW |