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

Unified Diff: net/quic/quic_client_session.cc

Issue 875583003: Do not pool QUIC sessions when privacy mode mismatches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2272
Patch Set: Created 5 years, 11 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/quic_client_session.h ('k') | net/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/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index 8a41c6a4b75ec73d78e7c70c74f939ed14dd5b0b..2ea94126ba64fc4b6e6511c6a12c3c41d8a7af89 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -186,7 +186,7 @@ void QuicClientSession::InitializeSession(
const QuicServerId& server_id,
QuicCryptoClientConfig* crypto_config,
QuicCryptoClientStreamFactory* crypto_client_stream_factory) {
- server_host_port_ = server_id.host_port_pair();
+ server_id_ = server_id;
crypto_stream_.reset(
crypto_client_stream_factory ?
crypto_client_stream_factory->CreateQuicCryptoClientStream(
@@ -531,8 +531,13 @@ int QuicClientSession::GetNumSentClientHellos() const {
return crypto_stream_->num_sent_client_hellos();
}
-bool QuicClientSession::CanPool(const std::string& hostname) const {
+bool QuicClientSession::CanPool(const std::string& hostname,
+ PrivacyMode privacy_mode) const {
DCHECK(connection()->connected());
+ if (privacy_mode != server_id_.privacy_mode()) {
+ // Privacy mode must always match.
+ return false;
+ }
SSLInfo ssl_info;
if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) {
// We can always pool with insecure QUIC sessions.
@@ -540,7 +545,7 @@ bool QuicClientSession::CanPool(const std::string& hostname) const {
}
return SpdySession::CanPool(transport_security_state_, ssl_info,
- server_host_port_.host(), hostname);
+ server_id_.host(), hostname);
}
QuicDataStream* QuicClientSession::CreateIncomingDataStream(
« no previous file with comments | « net/quic/quic_client_session.h ('k') | net/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698