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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_crypto_client_stream_test.cc ('k') | net/quic/quic_crypto_server_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_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "crypto/secure_hash.h" 8 #include "crypto/secure_hash.h"
9 #include "net/quic/crypto/cached_network_parameters.h" 9 #include "net/quic/crypto/cached_network_parameters.h"
10 #include "net/quic/crypto/crypto_protocol.h" 10 #include "net/quic/crypto/crypto_protocol.h"
(...skipping 14 matching lines...) Expand all
25 server_stream_->OnServerHelloAcked(); 25 server_stream_->OnServerHelloAcked();
26 } 26 }
27 27
28 QuicCryptoServerStream::QuicCryptoServerStream( 28 QuicCryptoServerStream::QuicCryptoServerStream(
29 const QuicCryptoServerConfig& crypto_config, 29 const QuicCryptoServerConfig& crypto_config,
30 QuicSession* session) 30 QuicSession* session)
31 : QuicCryptoStream(session), 31 : QuicCryptoStream(session),
32 crypto_config_(crypto_config), 32 crypto_config_(crypto_config),
33 validate_client_hello_cb_(nullptr), 33 validate_client_hello_cb_(nullptr),
34 num_handshake_messages_(0), 34 num_handshake_messages_(0),
35 num_server_config_update_messages_sent_(0) {} 35 num_server_config_update_messages_sent_(0) {
36 DCHECK(session->connection()->is_server());
37 }
36 38
37 QuicCryptoServerStream::~QuicCryptoServerStream() { 39 QuicCryptoServerStream::~QuicCryptoServerStream() {
38 CancelOutstandingCallbacks(); 40 CancelOutstandingCallbacks();
39 } 41 }
40 42
41 void QuicCryptoServerStream::CancelOutstandingCallbacks() { 43 void QuicCryptoServerStream::CancelOutstandingCallbacks() {
42 // Detach from the validation callback. Calling this multiple times is safe. 44 // Detach from the validation callback. Calling this multiple times is safe.
43 if (validate_client_hello_cb_ != nullptr) { 45 if (validate_client_hello_cb_ != nullptr) {
44 validate_client_hello_cb_->Cancel(); 46 validate_client_hello_cb_->Cancel();
45 } 47 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 252
251 void QuicCryptoServerStream::ValidateCallback::RunImpl( 253 void QuicCryptoServerStream::ValidateCallback::RunImpl(
252 const CryptoHandshakeMessage& client_hello, 254 const CryptoHandshakeMessage& client_hello,
253 const Result& result) { 255 const Result& result) {
254 if (parent_ != nullptr) { 256 if (parent_ != nullptr) {
255 parent_->FinishProcessingHandshakeMessage(client_hello, result); 257 parent_->FinishProcessingHandshakeMessage(client_hello, result);
256 } 258 }
257 } 259 }
258 260
259 } // namespace net 261 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698