Index: net/tools/quic/quic_client_session.cc |
diff --git a/net/tools/quic/quic_client_session.cc b/net/tools/quic/quic_client_session.cc |
index 1ee832206fd0f1cb2c89f9b393af93aa5600f40d..f4da1540a523b3ee6a71ef6d4e2f637298e03021 100644 |
--- a/net/tools/quic/quic_client_session.cc |
+++ b/net/tools/quic/quic_client_session.cc |
@@ -20,17 +20,19 @@ QuicClientSession::QuicClientSession(const QuicConfig& config, |
const QuicServerId& server_id, |
QuicCryptoClientConfig* crypto_config) |
: QuicClientSessionBase(connection, config), |
- crypto_stream_(new QuicCryptoClientStream( |
- server_id, |
- this, |
- new ProofVerifyContextChromium(0, BoundNetLog()), |
- crypto_config)), |
+ server_id_(server_id), |
+ crypto_config_(crypto_config), |
respect_goaway_(true) { |
} |
QuicClientSession::~QuicClientSession() { |
} |
+void QuicClientSession::Initialize() { |
+ crypto_stream_.reset(CreateQuicCryptoStream()); |
+ QuicClientSessionBase::Initialize(); |
+} |
+ |
void QuicClientSession::OnProofValid( |
const QuicCryptoClientConfig::CachedState& /*cached*/) {} |
@@ -61,7 +63,7 @@ QuicSpdyClientStream* QuicClientSession::CreateClientStream() { |
return new QuicSpdyClientStream(GetNextOutgoingStreamId(), this); |
} |
-QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { |
+QuicCryptoClientStreamBase* QuicClientSession::GetCryptoStream() { |
return crypto_stream_.get(); |
} |
@@ -80,5 +82,12 @@ QuicSpdyStream* QuicClientSession::CreateIncomingDynamicStream( |
return nullptr; |
} |
+QuicCryptoClientStreamBase* QuicClientSession::CreateQuicCryptoStream() { |
+ return new QuicCryptoClientStream( |
+ server_id_, this, new ProofVerifyContextChromium(0, BoundNetLog()), |
+ crypto_config_); |
+} |
+ |
} // namespace tools |
+ |
} // namespace net |