Index: net/quic/crypto/quic_crypto_client_config.cc |
diff --git a/net/quic/crypto/quic_crypto_client_config.cc b/net/quic/crypto/quic_crypto_client_config.cc |
index ac6480a377ef989528aff53080ad28986839be99..83e2a968b25f928ff1ab37df1bc038ff94d54c18 100644 |
--- a/net/quic/crypto/quic_crypto_client_config.cc |
+++ b/net/quic/crypto/quic_crypto_client_config.cc |
@@ -232,10 +232,10 @@ void QuicCryptoClientConfig::CachedState::InitializeFrom( |
} |
// An issue to be solved: while we are loading the data from disk cache, it is |
-// possible for another request for the same hostname update the CachedState |
-// because that request has sent FillInchoateClientHello and got REJ message. |
-// Loading of data from disk cache shouldn't blindly overwrite what is in |
-// CachedState. |
+// possible for another request for the same hostname and port update the |
+// CachedState because that request has sent FillInchoateClientHello and got REJ |
+// message. Loading of data from disk cache shouldn't blindly overwrite what is |
+// in CachedState. |
bool QuicCryptoClientConfig::CachedState::LoadQuicServerInfo(QuicWallTime now) { |
DCHECK(server_config_.empty()); |
DCHECK(quic_server_info_.get()); |
@@ -297,12 +297,13 @@ void QuicCryptoClientConfig::SetDefaults() { |
QuicCryptoClientConfig::CachedState* QuicCryptoClientConfig::Create( |
const string& server_hostname, |
+ uint16 port, |
QuicServerInfoFactory* quic_server_info_factory) { |
DCHECK(cached_states_.find(server_hostname) == cached_states_.end()); |
scoped_ptr<QuicServerInfo> quic_server_info; |
if (quic_server_info_factory) { |
quic_server_info.reset( |
- quic_server_info_factory->GetForHost(server_hostname)); |
+ quic_server_info_factory->GetForHost(server_hostname, port)); |
quic_server_info->Start(); |
} |
@@ -312,13 +313,14 @@ QuicCryptoClientConfig::CachedState* QuicCryptoClientConfig::Create( |
} |
QuicCryptoClientConfig::CachedState* QuicCryptoClientConfig::LookupOrCreate( |
- const string& server_hostname) { |
+ const string& server_hostname, |
+ uint16 port) { |
map<string, CachedState*>::const_iterator it = |
cached_states_.find(server_hostname); |
if (it != cached_states_.end()) { |
return it->second; |
} |
- return Create(server_hostname, NULL); |
+ return Create(server_hostname, port, NULL); |
} |
void QuicCryptoClientConfig::FillInchoateClientHello( |
@@ -722,14 +724,17 @@ void QuicCryptoClientConfig::SetChannelIDSigner(ChannelIDSigner* signer) { |
void QuicCryptoClientConfig::InitializeFrom( |
const std::string& server_hostname, |
+ uint16 server_port, |
const std::string& canonical_server_hostname, |
+ uint16 canonical_server_port, |
QuicCryptoClientConfig* canonical_crypto_config) { |
CachedState* canonical_cached = |
- canonical_crypto_config->LookupOrCreate(canonical_server_hostname); |
+ canonical_crypto_config->LookupOrCreate(canonical_server_hostname, |
+ canonical_server_port); |
if (!canonical_cached->proof_valid()) { |
return; |
} |
- CachedState* cached = LookupOrCreate(server_hostname); |
+ CachedState* cached = LookupOrCreate(server_hostname, server_port); |
cached->InitializeFrom(*canonical_cached); |
} |