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

Unified Diff: net/quic/quic_crypto_client_stream.cc

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments from Patch set 1 and 3 and merge with TOT Created 6 years, 9 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_crypto_client_stream.cc
diff --git a/net/quic/quic_crypto_client_stream.cc b/net/quic/quic_crypto_client_stream.cc
index 9e48e4f5611ac7ce14b654351298cc077531bd4f..2cf9afbf1eb0784ced4112eb12992e10d989760c 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -68,6 +68,7 @@ void QuicCryptoClientStream::ProofVerifierCallbackImpl::Cancel() {
QuicCryptoClientStream::QuicCryptoClientStream(
const string& server_hostname,
+ uint16 server_port,
QuicSession* session,
QuicCryptoClientConfig* crypto_config)
: QuicCryptoStream(session),
@@ -75,6 +76,7 @@ QuicCryptoClientStream::QuicCryptoClientStream(
num_client_hellos_(0),
crypto_config_(crypto_config),
server_hostname_(server_hostname),
+ server_port_(server_port),
generation_counter_(0),
proof_verify_callback_(NULL),
disk_cache_load_result_(ERR_UNEXPECTED),
@@ -153,7 +155,7 @@ void QuicCryptoClientStream::DoHandshakeLoop(
QuicErrorCode error;
string error_details;
QuicCryptoClientConfig::CachedState* cached =
- crypto_config_->LookupOrCreate(server_hostname_);
+ crypto_config_->LookupOrCreate(server_hostname_, server_port_);
if (in != NULL) {
DVLOG(1) << "Client: Received " << in->DebugString();
@@ -436,7 +438,7 @@ int QuicCryptoClientStream::DoLoadQuicServerInfo(
// We may need to call quic_server_info->Persist later.
// quic_server_info->Persist requires quic_server_info to be ready, so we
// always call WaitForDataReady, even though we might have initialized
- // |cached| config from the cached state for a canonical hostname.
+ // |cached| config from the cached state for a canonical hostname and port.
int rv = quic_server_info->WaitForDataReady(
base::Bind(&QuicCryptoClientStream::OnIOComplete,
weak_factory_.GetWeakPtr()));

Powered by Google App Engine
This is Rietveld 408576698