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

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

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 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
« no previous file with comments | « net/quic/core/quic_crypto_stream.h ('k') | net/quic/core/quic_end_to_end_unittest.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/core/quic_crypto_stream.h" 5 #include "net/quic/core/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/core/crypto/crypto_handshake.h" 10 #include "net/quic/core/crypto/crypto_handshake.h"
(...skipping 15 matching lines...) Expand all
26 26
27 QuicCryptoStream::QuicCryptoStream(QuicSession* session) 27 QuicCryptoStream::QuicCryptoStream(QuicSession* session)
28 : ReliableQuicStream(kCryptoStreamId, session), 28 : ReliableQuicStream(kCryptoStreamId, session),
29 encryption_established_(false), 29 encryption_established_(false),
30 handshake_confirmed_(false) { 30 handshake_confirmed_(false) {
31 crypto_framer_.set_visitor(this); 31 crypto_framer_.set_visitor(this);
32 // The crypto stream is exempt from connection level flow control. 32 // The crypto stream is exempt from connection level flow control.
33 DisableConnectionFlowControlForThisStream(); 33 DisableConnectionFlowControlForThisStream();
34 } 34 }
35 35
36 // static
37 QuicByteCount QuicCryptoStream::CryptoMessageFramingOverhead(
38 QuicVersion version) {
39 return QuicPacketCreator::StreamFramePacketOverhead(
40 version, PACKET_8BYTE_CONNECTION_ID,
41 /*include_version=*/true,
42 /*include_path_id=*/true,
43 /*include_diversification_nonce=*/true, PACKET_1BYTE_PACKET_NUMBER,
44 /*offset=*/0);
45 }
46
36 void QuicCryptoStream::OnError(CryptoFramer* framer) { 47 void QuicCryptoStream::OnError(CryptoFramer* framer) {
37 DLOG(WARNING) << "Error processing crypto data: " 48 DLOG(WARNING) << "Error processing crypto data: "
38 << QuicUtils::ErrorToString(framer->error()); 49 << QuicUtils::ErrorToString(framer->error());
39 } 50 }
40 51
41 void QuicCryptoStream::OnHandshakeMessage( 52 void QuicCryptoStream::OnHandshakeMessage(
42 const CryptoHandshakeMessage& message) { 53 const CryptoHandshakeMessage& message) {
43 DVLOG(1) << ENDPOINT << "Received " << message.DebugString(); 54 DVLOG(1) << ENDPOINT << "Received " << message.DebugString();
44 session()->OnCryptoHandshakeMessageReceived(message); 55 session()->OnCryptoHandshakeMessageReceived(message);
45 } 56 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding", 107 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding",
97 /* context= */ "", 32, result); 108 /* context= */ "", 32, result);
98 } 109 }
99 110
100 const QuicCryptoNegotiatedParameters& 111 const QuicCryptoNegotiatedParameters&
101 QuicCryptoStream::crypto_negotiated_params() const { 112 QuicCryptoStream::crypto_negotiated_params() const {
102 return crypto_negotiated_params_; 113 return crypto_negotiated_params_;
103 } 114 }
104 115
105 } // namespace net 116 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_crypto_stream.h ('k') | net/quic/core/quic_end_to_end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698