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

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

Issue 454263002: QUIC - clean up changes to keep in sync with internal source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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
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_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 (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 is_server_(session->is_server()) {
28 crypto_framer_.set_visitor(this); 27 crypto_framer_.set_visitor(this);
29 if (version() <= QUIC_VERSION_20) { 28 if (version() <= QUIC_VERSION_20) {
30 // 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
31 // control. 30 // control.
32 DisableFlowControl(); 31 DisableFlowControl();
33 } 32 }
34 // The crypto stream is exempt from connection level flow control. 33 // The crypto stream is exempt from connection level flow control.
35 DisableConnectionFlowControlForThisStream(); 34 DisableConnectionFlowControlForThisStream();
36 } 35 }
37 36
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 result_len, 90 result_len,
92 result); 91 result);
93 } 92 }
94 93
95 const QuicCryptoNegotiatedParameters& 94 const QuicCryptoNegotiatedParameters&
96 QuicCryptoStream::crypto_negotiated_params() const { 95 QuicCryptoStream::crypto_negotiated_params() const {
97 return crypto_negotiated_params_; 96 return crypto_negotiated_params_;
98 } 97 }
99 98
100 } // namespace net 99 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698