summaryrefslogtreecommitdiffstats
path: root/net/quic/crypto/quic_crypto_client_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/crypto/quic_crypto_client_config.h')
-rw-r--r--net/quic/crypto/quic_crypto_client_config.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/net/quic/crypto/quic_crypto_client_config.h b/net/quic/crypto/quic_crypto_client_config.h
index 30b5196d..b11c197fa 100644
--- a/net/quic/crypto/quic_crypto_client_config.h
+++ b/net/quic/crypto/quic_crypto_client_config.h
@@ -36,6 +36,7 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
class NET_EXPORT_PRIVATE CachedState {
public:
CachedState();
+ explicit CachedState(scoped_ptr<QuicServerInfo> quic_server_info);
~CachedState();
// IsComplete returns true if this object contains enough information to
@@ -94,11 +95,6 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
// unchanged.
void InitializeFrom(const CachedState& other);
- // TODO(rtenneti): Need to flesh out the details of this method. A temporary
- // place holder to load CachedState from disk cache.
- void LoadFromDiskCache(QuicServerInfoFactory* quic_server_info_factory,
- const std::string& server_hostname);
-
private:
std::string server_config_id_; // An opaque id from the server.
std::string server_config_; // A serialized handshake message.
@@ -119,21 +115,29 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
// scfg contains the cached, parsed value of |server_config|.
mutable scoped_ptr<CryptoHandshakeMessage> scfg_;
+ // |quic_server_info_| is used to fetch crypto config information from disk.
scoped_ptr<QuicServerInfo> quic_server_info_;
DISALLOW_COPY_AND_ASSIGN(CachedState);
};
QuicCryptoClientConfig();
- explicit QuicCryptoClientConfig(
- QuicServerInfoFactory* quic_server_info_factory);
~QuicCryptoClientConfig();
// Sets the members to reasonable, default values.
void SetDefaults();
+ // Create returns a CachedState for the given hostname. 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,
+ QuicServerInfoFactory* quic_server_info_factory);
+
// LookupOrCreate returns a CachedState for the given hostname. 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);
// FillInchoateClientHello sets |out| to be a CHLO message that elicits a
@@ -224,7 +228,6 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
// about that server.
std::map<std::string, CachedState*> cached_states_;
- QuicServerInfoFactory* quic_server_info_factory_;
scoped_ptr<ProofVerifier> proof_verifier_;
scoped_ptr<ChannelIDSigner> channel_id_signer_;