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

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

Issue 2176193003: deprecate FLAGS_quic_enable_chlo_policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@127871521
Patch Set: Created 4 years, 5 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 | « no previous file | 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 <memory> 7 #include <memory>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "crypto/secure_hash.h" 10 #include "crypto/secure_hash.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 421 }
422 422
423 QuicErrorCode QuicCryptoServerStream::ProcessClientHello( 423 QuicErrorCode QuicCryptoServerStream::ProcessClientHello(
424 const CryptoHandshakeMessage& message, 424 const CryptoHandshakeMessage& message,
425 const ValidateClientHelloResultCallback::Result& result, 425 const ValidateClientHelloResultCallback::Result& result,
426 CryptoHandshakeMessage* reply, 426 CryptoHandshakeMessage* reply,
427 DiversificationNonce* out_diversification_nonce, 427 DiversificationNonce* out_diversification_nonce,
428 string* error_details) { 428 string* error_details) {
429 QuicServerSessionBase* session_base = 429 QuicServerSessionBase* session_base =
430 static_cast<QuicServerSessionBase*>(session()); 430 static_cast<QuicServerSessionBase*>(session());
431 if (FLAGS_quic_enable_chlo_policy && 431 if (!session_base->CanAcceptClientHello(message, error_details)) {
432 !session_base->CanAcceptClientHello(message, error_details)) {
433 return QUIC_HANDSHAKE_FAILED; 432 return QUIC_HANDSHAKE_FAILED;
434 } 433 }
435 434
436 if (!result.info.server_nonce.empty()) { 435 if (!result.info.server_nonce.empty()) {
437 ++num_handshake_messages_with_server_nonces_; 436 ++num_handshake_messages_with_server_nonces_;
438 } 437 }
439 // Store the bandwidth estimate from the client. 438 // Store the bandwidth estimate from the client.
440 if (result.cached_network_params.bandwidth_estimate_bytes_per_second() > 0) { 439 if (result.cached_network_params.bandwidth_estimate_bytes_per_second() > 0) {
441 previous_cached_network_params_.reset( 440 previous_cached_network_params_.reset(
442 new CachedNetworkParameters(result.cached_network_params)); 441 new CachedNetworkParameters(result.cached_network_params));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( 481 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject(
483 QuicConnectionId connection_id) { 482 QuicConnectionId connection_id) {
484 // TODO(rch): Remove this method when 483 // TODO(rch): Remove this method when
485 // reloadable_flag_quic_dispatcher_creates_id2 is removed. 484 // reloadable_flag_quic_dispatcher_creates_id2 is removed.
486 QuicServerSessionBase* session_base = 485 QuicServerSessionBase* session_base =
487 static_cast<QuicServerSessionBase*>(session()); 486 static_cast<QuicServerSessionBase*>(session());
488 return session_base->GenerateConnectionIdForReject(connection_id); 487 return session_base->GenerateConnectionIdForReject(connection_id);
489 } 488 }
490 489
491 } // namespace net 490 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698