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

Unified Diff: net/tools/quic/quic_client_session.cc

Issue 1425363002: Factor QuicCryptoClientStream APIs into QuicCryptoClientStreamBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106313860
Patch Set: Created 5 years, 1 month 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/tools/quic/quic_client_session.h ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/tools/quic/quic_client_session.h ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698