| Index: net/quic/quic_client_session.cc
|
| diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
|
| index 54c52ef70d11d72b4d129a27ce02662f881e2c86..1b59a40e45c060ccb9ab3f7e7cd25253ddf6455a 100644
|
| --- a/net/quic/quic_client_session.cc
|
| +++ b/net/quic/quic_client_session.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/metrics/sparse_histogram.h"
|
| +#include "base/profiler/scoped_tracker.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/values.h"
|
| @@ -175,6 +176,11 @@ QuicClientSession::QuicClientSession(
|
| num_packets_read_(0),
|
| going_away_(false),
|
| weak_factory_(this) {
|
| + // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
|
| + tracked_objects::ScopedTracker tracking_profile(
|
| + FROM_HERE_WITH_EXPLICIT_FUNCTION(
|
| + "422516 QuicClientSession::QuicClientSession"));
|
| +
|
| connection->set_debug_visitor(logger_);
|
| IPEndPoint address;
|
| if (socket && socket->GetLocalAddress(&address) == OK &&
|
| @@ -188,7 +194,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(
|
| @@ -533,8 +539,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.
|
| @@ -542,7 +553,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(
|
|
|