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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_stream_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_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_21) {
29 // Prior to QUIC_VERSION_21 the crypto stream is not subject to any flow
30 // control.
31 DisableFlowControl();
32 }
33 // The crypto stream is exempt from connection level flow control. 28 // The crypto stream is exempt from connection level flow control.
34 DisableConnectionFlowControlForThisStream(); 29 DisableConnectionFlowControlForThisStream();
35 } 30 }
36 31
37 void QuicCryptoStream::OnError(CryptoFramer* framer) { 32 void QuicCryptoStream::OnError(CryptoFramer* framer) {
38 DLOG(WARNING) << "Error processing crypto data: " 33 DLOG(WARNING) << "Error processing crypto data: "
39 << QuicUtils::ErrorToString(framer->error()); 34 << QuicUtils::ErrorToString(framer->error());
40 } 35 }
41 36
42 void QuicCryptoStream::OnHandshakeMessage( 37 void QuicCryptoStream::OnHandshakeMessage(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 result_len, 85 result_len,
91 result); 86 result);
92 } 87 }
93 88
94 const QuicCryptoNegotiatedParameters& 89 const QuicCryptoNegotiatedParameters&
95 QuicCryptoStream::crypto_negotiated_params() const { 90 QuicCryptoStream::crypto_negotiated_params() const {
96 return crypto_negotiated_params_; 91 return crypto_negotiated_params_;
97 } 92 }
98 93
99 } // namespace net 94 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698