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

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: fixed wtc's comment 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..a83eadaf0e7b7fde15d2ec5ba292902db7964001 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -428,9 +428,10 @@ int QuicCryptoClientStream::DoLoadQuicServerInfo(
// 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.
+ // 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.
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