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

Unified Diff: net/quic/quic_crypto_client_stream.cc

Issue 174533002: QUIC - clarified comments for persisting crypto config per comments in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fd5422eaa792dce79201fe71dad566e5afc6f2e4..71d369d7607fe8cf5bb6d1802bede2ed4329aa80 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -427,10 +427,11 @@ int QuicCryptoClientStream::DoLoadQuicServerInfo(
// TODO(rtenneti): If multiple tabs load the same URL, all requests except for
// the first request send InchoateClientHello. Fix the code to handle multiple
// requests. A possible solution is to wait for the first request to finish
- // and use the data from the disk cache for all requests.
- // quic_server_info->Persist requires quic_server_info to be ready. We might
- // have already initialized |cached| config from a the cached state for a
- // canonical hostname.
+ // and use the data from the disk cache for all requests. We may need to call
wtc 2014/02/21 00:04:28 Please start a new paragraph, to make it clear tha
ramant (doing other things) 2014/02/21 00:08:10 Thanks very much. Done.
+ // 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.
int rv = quic_server_info->WaitForDataReady(
base::Bind(&QuicCryptoClientStream::OnIOComplete,
base::Unretained(this)));
@@ -447,11 +448,8 @@ void QuicCryptoClientStream::DoLoadQuicServerInfoComplete(
// If someone else already saved a server config, we don't want to overwrite
// it. Also, if someone else saved a server config and then cleared it (so
- // cached->IsEmpty() is true, but the generation counter changed), we still
- // want to load from QuicServerInfo.
+ // cached->IsEmpty() is true), we still want to load from QuicServerInfo.
if (!cached->IsEmpty()) {
- // Someone else has already saved a server config received from the network
- // or the canonical server config.
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698