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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 149413008: QUIC - Start the process for reading crypto config data from disk cache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed wtc's comments Created 6 years, 11 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_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 06e7825fb096835070df21a36e1464a07f62dea6..7f91e059af676334c1626dfc0403a008d964d208 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -327,6 +327,10 @@ int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair,
return ERR_IO_PENDING;
}
+ QuicCryptoClientConfig* crypto_config =
+ GetOrCreateCryptoConfig(host_port_proxy_pair);
+ DCHECK(crypto_config);
wtc 2014/02/04 01:37:02 Please add a comment to explain why we are doing t
ramant (doing other things) 2014/02/04 19:23:53 Added a comment about why we are starting this pro
+
scoped_ptr<Job> job(new Job(this, host_resolver_, host_port_proxy_pair,
is_https, cert_verifier, net_log));
int rv = job->Run(base::Bind(&QuicStreamFactory::OnJobComplete,
@@ -564,8 +568,9 @@ int QuicStreamFactory::CreateSession(
writer->SetConnection(connection);
connection->options()->max_packet_length = max_packet_length_;
+ DCHECK(ContainsKey(all_crypto_configs_, host_port_proxy_pair));
QuicCryptoClientConfig* crypto_config =
- GetOrCreateCryptoConfig(host_port_proxy_pair);
+ all_crypto_configs_[host_port_proxy_pair];
ramant (doing other things) 2014/02/04 19:23:53 Undid this change. GetOrCreateCryptoConfig is call
DCHECK(crypto_config);
*session = new QuicClientSession(
@@ -606,7 +611,13 @@ QuicCryptoClientConfig* QuicStreamFactory::GetOrCreateCryptoConfig(
} else {
// TODO(rtenneti): if two quic_sessions for the same host_port_proxy_pair
// share the same crypto_config, will it cause issues?
- crypto_config = new QuicCryptoClientConfig(quic_server_info_factory_);
+ crypto_config = new QuicCryptoClientConfig();
+ if (quic_server_info_factory_) {
+ QuicCryptoClientConfig::CachedState* cached =
+ crypto_config->CreateCachedState(host_port_proxy_pair.first.host(),
+ quic_server_info_factory_);
+ DCHECK(cached);
+ }
crypto_config->SetDefaults();
all_crypto_configs_[host_port_proxy_pair] = crypto_config;
PopulateFromCanonicalConfig(host_port_proxy_pair, crypto_config);
« net/quic/crypto/quic_crypto_client_config.cc ('K') | « net/quic/crypto/quic_crypto_client_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698