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

Unified Diff: net/quic/quic_client_session.cc

Issue 481103003: QUIC - Construct crypto_stream_ in QuicClientSession::InitializeSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 4 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
Index: net/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index 285c234a5b29f18b4f771cb792228ba930dec29c..2defa13fbcc8a320977141fcd8a661a5c3072c04 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -137,16 +137,12 @@ QuicClientSession::QuicClientSession(
QuicConnection* connection,
scoped_ptr<DatagramClientSocket> socket,
QuicStreamFactory* stream_factory,
- QuicCryptoClientStreamFactory* crypto_client_stream_factory,
TransportSecurityState* transport_security_state,
scoped_ptr<QuicServerInfo> server_info,
- const QuicServerId& server_id,
const QuicConfig& config,
- QuicCryptoClientConfig* crypto_config,
base::TaskRunner* task_runner,
NetLog* net_log)
: QuicClientSessionBase(connection, config),
- server_host_port_(server_id.host_port_pair()),
require_confirmation_(false),
stream_factory_(stream_factory),
socket_(socket.Pass()),
@@ -161,6 +157,14 @@ QuicClientSession::QuicClientSession(
num_packets_read_(0),
going_away_(false),
weak_factory_(this) {
+ connection->set_debug_visitor(logger_);
+}
+
+void QuicClientSession::InitializeSession(
+ const QuicServerId& server_id,
+ QuicCryptoClientConfig* crypto_config,
+ QuicCryptoClientStreamFactory* crypto_client_stream_factory) {
+ server_host_port_.reset(new HostPortPair(server_id.host_port_pair()));
crypto_stream_.reset(
crypto_client_stream_factory ?
crypto_client_stream_factory->CreateQuicCryptoClientStream(
@@ -168,8 +172,7 @@ QuicClientSession::QuicClientSession(
new QuicCryptoClientStream(server_id, this,
new ProofVerifyContextChromium(net_log_),
crypto_config));
-
- connection->set_debug_visitor(logger_);
+ QuicClientSessionBase::InitializeSession();
// TODO(rch): pass in full host port proxy pair
net_log_.BeginEvent(
NetLog::TYPE_QUIC_SESSION,
@@ -491,7 +494,7 @@ bool QuicClientSession::CanPool(const std::string& hostname) const {
}
return SpdySession::CanPool(transport_security_state_, ssl_info,
- server_host_port_.host(), hostname);
+ server_host_port_->host(), hostname);
}
QuicDataStream* QuicClientSession::CreateIncomingDataStream(

Powered by Google App Engine
This is Rietveld 408576698