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

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

Issue 1783713003: Add a boolean use_stateless_rejects_if_peer_supported argument to the QuicCryptoServerStream constr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_server_stream.h ('k') | net/quic/test_tools/quic_test_utils.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/crypto_protocol.h" 9 #include "net/quic/crypto/crypto_protocol.h"
10 #include "net/quic/crypto/crypto_utils.h" 10 #include "net/quic/crypto/crypto_utils.h"
(...skipping 30 matching lines...) Expand all
41 void ServerHelloNotifier::OnPacketAcked(int acked_bytes, 41 void ServerHelloNotifier::OnPacketAcked(int acked_bytes,
42 QuicTime::Delta ack_delay_time) { 42 QuicTime::Delta ack_delay_time) {
43 // The SHLO is sent in one packet. 43 // The SHLO is sent in one packet.
44 server_stream_->OnServerHelloAcked(); 44 server_stream_->OnServerHelloAcked();
45 } 45 }
46 46
47 void ServerHelloNotifier::OnPacketRetransmitted(int /*retransmitted_bytes*/) {} 47 void ServerHelloNotifier::OnPacketRetransmitted(int /*retransmitted_bytes*/) {}
48 48
49 QuicCryptoServerStream::QuicCryptoServerStream( 49 QuicCryptoServerStream::QuicCryptoServerStream(
50 const QuicCryptoServerConfig* crypto_config, 50 const QuicCryptoServerConfig* crypto_config,
51 bool use_stateless_rejects_if_peer_supported,
51 QuicSession* session) 52 QuicSession* session)
52 : QuicCryptoServerStreamBase(session), 53 : QuicCryptoServerStreamBase(session),
53 crypto_config_(crypto_config), 54 crypto_config_(crypto_config),
54 validate_client_hello_cb_(nullptr), 55 validate_client_hello_cb_(nullptr),
55 num_handshake_messages_(0), 56 num_handshake_messages_(0),
56 num_handshake_messages_with_server_nonces_(0), 57 num_handshake_messages_with_server_nonces_(0),
57 num_server_config_update_messages_sent_(0), 58 num_server_config_update_messages_sent_(0),
58 use_stateless_rejects_if_peer_supported_( 59 use_stateless_rejects_if_peer_supported_(
59 FLAGS_enable_quic_stateless_reject_support), 60 use_stateless_rejects_if_peer_supported),
60 peer_supports_stateless_rejects_(false) { 61 peer_supports_stateless_rejects_(false) {
61 DCHECK_EQ(Perspective::IS_SERVER, session->connection()->perspective()); 62 DCHECK_EQ(Perspective::IS_SERVER, session->connection()->perspective());
62 } 63 }
63 64
64 QuicCryptoServerStream::~QuicCryptoServerStream() { 65 QuicCryptoServerStream::~QuicCryptoServerStream() {
65 CancelOutstandingCallbacks(); 66 CancelOutstandingCallbacks();
66 } 67 }
67 68
68 void QuicCryptoServerStream::CancelOutstandingCallbacks() { 69 void QuicCryptoServerStream::CancelOutstandingCallbacks() {
69 // Detach from the validation callback. Calling this multiple times is safe. 70 // Detach from the validation callback. Calling this multiple times is safe.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 377 }
377 for (size_t i = 0; i < received_tags_length; ++i) { 378 for (size_t i = 0; i < received_tags_length; ++i) {
378 if (received_tags[i] == kSREJ) { 379 if (received_tags[i] == kSREJ) {
379 return true; 380 return true;
380 } 381 }
381 } 382 }
382 return false; 383 return false;
383 } 384 }
384 385
385 } // namespace net 386 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream.h ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698