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

Unified Diff: net/quic/quic_crypto_client_stream.h

Issue 154933003: Persist server's crypto config data to disk cache for 0-RTT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments in patch set 7 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
Index: net/quic/quic_crypto_client_stream.h
diff --git a/net/quic/quic_crypto_client_stream.h b/net/quic/quic_crypto_client_stream.h
index 1ca423f012b25c022000d69ac2cc0cdb77d20c87..b1f07e0e42f1ef4759c997546ed4d54e7c7927cc 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -48,6 +48,8 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
// Gets the SSL connection information.
virtual bool GetSSLInfo(SSLInfo* ssl_info);
+ void OnIOComplete(int result);
+
private:
// ProofVerifierCallbackImpl is passed as the callback method to VerifyProof.
// The ProofVerifier calls this class with the result of proof verification
@@ -75,6 +77,8 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
enum State {
STATE_IDLE,
+ STATE_LOAD_QUIC_SERVER_INFO,
+ STATE_LOAD_QUIC_SERVER_INFO_COMPLETE,
STATE_SEND_CHLO,
STATE_RECV_REJ,
STATE_VERIFY_PROOF,
@@ -86,6 +90,15 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
// |in| may be NULL if the call did not result from a received message
void DoHandshakeLoop(const CryptoHandshakeMessage* in);
+ // TODO(rtenneti): convert the other states of the state machine into DoXXX
+ // functions.
+
+ // Call QuicServerInfo's WaitForDataReady to load the server information from
+ // the disk cache.
+ int DoLoadQuicServerInfo(QuicCryptoClientConfig::CachedState* cached);
+ void DoLoadQuicServerInfoComplete(
+ QuicCryptoClientConfig::CachedState* cached);
+
State next_state_;
// num_client_hellos_ contains the number of client hello messages that this
// connection has sent.
@@ -115,6 +128,10 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
// The result of certificate verification.
scoped_ptr<CertVerifyResult> cert_verify_result_;
+ // This member is used to store the result of an asynchronous disk cache read.
+ // It must not be used after STATE_LOAD_QUIC_SERVER_INFO_COMPLETE.
+ int disk_cache_load_result_;
+
DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream);
};

Powered by Google App Engine
This is Rietveld 408576698