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

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

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. 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') | net/quic/core/quic_flags_list.h » ('j') | 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 fbcf15bbea3cdc7cfecc14d2eab8eb2c0e9e55b0..8de966b02e20823b25787a52c991f12e6fd52327 100644
--- a/net/quic/core/quic_crypto_server_stream.cc
+++ b/net/quic/core/quic_crypto_server_stream.cc
@@ -23,8 +23,7 @@ using std::string;
namespace net {
-QuicCryptoServerStreamBase::QuicCryptoServerStreamBase(
- QuicServerSessionBase* session)
+QuicCryptoServerStreamBase::QuicCryptoServerStreamBase(QuicSession* session)
: QuicCryptoStream(session) {}
// TODO(jokulik): Once stateless rejects support is inherent in the version
@@ -51,11 +50,13 @@ QuicCryptoServerStream::QuicCryptoServerStream(
const QuicCryptoServerConfig* crypto_config,
QuicCompressedCertsCache* compressed_certs_cache,
bool use_stateless_rejects_if_peer_supported,
- QuicServerSessionBase* session)
+ QuicSession* session,
+ Helper* helper)
: QuicCryptoServerStreamBase(session),
crypto_config_(crypto_config),
compressed_certs_cache_(compressed_certs_cache),
validate_client_hello_cb_(nullptr),
+ helper_(helper),
num_handshake_messages_(0),
num_handshake_messages_with_server_nonces_(0),
send_server_config_update_cb_(nullptr),
@@ -384,9 +385,8 @@ QuicErrorCode QuicCryptoServerStream::ProcessClientHello(
CryptoHandshakeMessage* reply,
DiversificationNonce* out_diversification_nonce,
string* error_details) {
- QuicServerSessionBase* session_base =
- static_cast<QuicServerSessionBase*>(session());
- if (!session_base->CanAcceptClientHello(message, error_details)) {
+ if (!helper_->CanAcceptClientHello(
+ message, session()->connection()->self_address(), error_details)) {
return QUIC_HANDSHAKE_FAILED;
}
@@ -442,9 +442,7 @@ QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject(
if (!use_stateless_rejects) {
return 0;
}
- QuicServerSessionBase* session_base =
- static_cast<QuicServerSessionBase*>(session());
- return session_base->GenerateConnectionIdForReject(
+ return helper_->GenerateConnectionIdForReject(
session()->connection()->connection_id());
}
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.h ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698