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

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

Issue 2430973004: Landing Recent QUIC changes until 10:38 AM, Oct 17, 2016 UTC-4 (Closed)
Patch Set: Improving flagsaver logging Created 4 years, 2 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_server_stream.cc ('k') | net/quic/core/quic_flags_list.h » ('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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // No more data to read. 62 // No more data to read.
63 break; 63 break;
64 } 64 }
65 StringPiece data(static_cast<char*>(iov.iov_base), iov.iov_len); 65 StringPiece data(static_cast<char*>(iov.iov_base), iov.iov_len);
66 if (!crypto_framer_.ProcessInput(data)) { 66 if (!crypto_framer_.ProcessInput(data)) {
67 CloseConnectionWithDetails(crypto_framer_.error(), 67 CloseConnectionWithDetails(crypto_framer_.error(),
68 crypto_framer_.error_detail()); 68 crypto_framer_.error_detail());
69 return; 69 return;
70 } 70 }
71 sequencer()->MarkConsumed(iov.iov_len); 71 sequencer()->MarkConsumed(iov.iov_len);
72 if (handshake_confirmed_ && crypto_framer_.InputBytesRemaining() == 0) { 72 if (handshake_confirmed_ && crypto_framer_.InputBytesRemaining() == 0 &&
73 FLAGS_quic_release_crypto_stream_buffer) {
73 // If the handshake is complete and the current message has been fully 74 // If the handshake is complete and the current message has been fully
74 // processed then no more handshake messages are likely to arrive soon 75 // processed then no more handshake messages are likely to arrive soon
75 // so release the memory in the stream sequencer. 76 // so release the memory in the stream sequencer.
76 sequencer()->ReleaseBufferIfEmpty(); 77 sequencer()->ReleaseBufferIfEmpty();
77 } 78 }
78 } 79 }
79 } 80 }
80 81
81 void QuicCryptoStream::SendHandshakeMessage( 82 void QuicCryptoStream::SendHandshakeMessage(
82 const CryptoHandshakeMessage& message) { 83 const CryptoHandshakeMessage& message) {
(...skipping 28 matching lines...) Expand all
111 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding", 112 crypto_negotiated_params_.initial_subkey_secret, "EXPORTER-Token-Binding",
112 /* context= */ "", 32, result); 113 /* context= */ "", 32, result);
113 } 114 }
114 115
115 const QuicCryptoNegotiatedParameters& 116 const QuicCryptoNegotiatedParameters&
116 QuicCryptoStream::crypto_negotiated_params() const { 117 QuicCryptoStream::crypto_negotiated_params() const {
117 return crypto_negotiated_params_; 118 return crypto_negotiated_params_;
118 } 119 }
119 120
120 } // namespace net 121 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.cc ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698