Index: net/quic/crypto/quic_crypto_client_config.h |
diff --git a/net/quic/crypto/quic_crypto_client_config.h b/net/quic/crypto/quic_crypto_client_config.h |
index 896f5fb03f5393b4bd488bf9520be7e47f851b5c..939e5229329cffb61c2a897b6b499e58622a62ed 100644 |
--- a/net/quic/crypto/quic_crypto_client_config.h |
+++ b/net/quic/crypto/quic_crypto_client_config.h |
@@ -24,6 +24,7 @@ class ProofVerifyDetails; |
class QuicRandom; |
class QuicServerInfo; |
class QuicServerInfoFactory; |
+class QuicSessionKey; |
// QuicCryptoClientConfig contains crypto-related configuration settings for a |
// client. Note that this object isn't thread-safe. It's designed to be used on |
@@ -143,18 +144,18 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig { |
// Sets the members to reasonable, default values. |
void SetDefaults(); |
- // Create returns a CachedState for the given hostname. It creates a |
+ // Create returns a CachedState for the given |server_key|. It creates a |
// CachedState and caches it. If |quic_server_info_factory| is not NULL, then |
// it is used to create QuicServerInfo which is used to fetch crypto config |
- // information from disk for the given hostname. |
- CachedState* Create(const std::string& server_hostname, |
+ // information from disk for the given |server_key|. |
+ CachedState* Create(const QuicSessionKey& server_key, |
QuicServerInfoFactory* quic_server_info_factory); |
- // LookupOrCreate returns a CachedState for the given hostname. If no such |
+ // LookupOrCreate returns a CachedState for the given |server_key|. If no such |
// CachedState currently exists, it will be created and cached. |
// TODO(rtenneti): fix the server code and pass QuicServerInfoFactory as |
// argument. |
- CachedState* LookupOrCreate(const std::string& server_hostname); |
+ CachedState* LookupOrCreate(const QuicSessionKey& server_key); |
// FillInchoateClientHello sets |out| to be a CHLO message that elicits a |
// source-address token or SCFG from a server. If |cached| is non-NULL, the |
@@ -232,17 +233,16 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig { |
void SetChannelIDSigner(ChannelIDSigner* signer); |
// Initialize the CachedState from |canonical_crypto_config| for the |
- // |canonical_server_hostname| as the initial CachedState for |
- // |server_hostname|. We will copy config data only if |
- // |canonical_crypto_config| has valid proof. |
- void InitializeFrom(const std::string& server_hostname, |
- const std::string& canonical_server_hostname, |
+ // |canonical_server_key| as the initial CachedState for |server_key|. We will |
+ // copy config data only if |canonical_crypto_config| has valid proof. |
+ void InitializeFrom(const QuicSessionKey& server_key, |
+ const QuicSessionKey& canonical_server_key, |
QuicCryptoClientConfig* canonical_crypto_config); |
private: |
- // cached_states_ maps from the server hostname to the cached information |
- // about that server. |
- std::map<std::string, CachedState*> cached_states_; |
+ // cached_states_ maps from the server_key to the cached information about |
+ // that server. |
+ std::map<QuicSessionKey, CachedState*> cached_states_; |
scoped_ptr<ProofVerifier> proof_verifier_; |
scoped_ptr<ChannelIDSigner> channel_id_signer_; |