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

Unified Diff: net/quic/core/quic_crypto_server_stream.cc

Issue 2289363003: Clean up QuicCryptoServerStream::GenerateConnectionIdForReject code (Closed)
Patch Set: Clean up QuicCryptoServerStream::GenerateConnectionIdForReject code Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_crypto_server_stream.cc
diff --git a/net/quic/core/quic_crypto_server_stream.cc b/net/quic/core/quic_crypto_server_stream.cc
index 94bc66e47f5e2cf50e21fdc1e6a0d0fe50b171ab..fbcf15bbea3cdc7cfecc14d2eab8eb2c0e9e55b0 100644
--- a/net/quic/core/quic_crypto_server_stream.cc
+++ b/net/quic/core/quic_crypto_server_stream.cc
@@ -405,9 +405,7 @@ QuicErrorCode QuicCryptoServerStream::ProcessClientHello(
peer_supports_stateless_rejects_;
QuicConnection* connection = session()->connection();
const QuicConnectionId server_designated_connection_id =
- use_stateless_rejects_in_crypto_config
- ? GenerateConnectionIdForReject(connection->connection_id())
- : 0;
+ GenerateConnectionIdForReject(use_stateless_rejects_in_crypto_config);
return crypto_config_->ProcessClientHello(
result, /*reject_only=*/false, connection->connection_id(),
connection->self_address().address(), connection->peer_address(),
@@ -440,12 +438,14 @@ void QuicCryptoServerStream::ValidateCallback::RunImpl(
}
QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject(
- QuicConnectionId connection_id) {
- // TODO(rch): Remove this method when
- // reloadable_flag_quic_dispatcher_creates_id2 is removed.
+ bool use_stateless_rejects) {
+ if (!use_stateless_rejects) {
+ return 0;
+ }
QuicServerSessionBase* session_base =
static_cast<QuicServerSessionBase*>(session());
- return session_base->GenerateConnectionIdForReject(connection_id);
+ return session_base->GenerateConnectionIdForReject(
+ session()->connection()->connection_id());
}
} // namespace net
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698