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

Unified Diff: net/quic/crypto/quic_crypto_client_config.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: Fix comments for Patch Set 4 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/crypto/quic_crypto_client_config.h
diff --git a/net/quic/crypto/quic_crypto_client_config.h b/net/quic/crypto/quic_crypto_client_config.h
index b11c197fa612921128125189a63d241385c2ef82..d174e436264bf7f20c38ee1128b155d805701ee6 100644
--- a/net/quic/crypto/quic_crypto_client_config.h
+++ b/net/quic/crypto/quic_crypto_client_config.h
@@ -67,7 +67,9 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
void ClearProof();
// SetProofValid records that the certificate chain and signature have been
- // validated and that it's safe to assume that the server is legitimate.
+ // validated and that it's safe to assume that the server is legitimate. It
+ // calls SaveQuicServerInfo() to persist the server config information to
wtc 2014/02/13 23:48:43 Nit: it is not necessary to mention it calls SaveQ
ramant (doing other things) 2014/02/15 00:36:12 Done.
+ // disk cache.
// (Note: this does not check the chain or signature.)
void SetProofValid();
@@ -83,6 +85,7 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
bool proof_valid() const;
uint64 generation_counter() const;
const ProofVerifyDetails* proof_verify_details() const;
+ QuicServerInfo* quic_server_info() const;
void set_source_address_token(base::StringPiece token);
@@ -95,7 +98,17 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
// unchanged.
void InitializeFrom(const CachedState& other);
+ // Fill out the |server_config_|, |source_address_token_|, |certs_| and
+ // |server_config_sig_| fields from |quic_server_info_|. |quic_server_info_|
+ // reads this information from the disk cache.
+ void LoadQuicServerInfo();
+
+ // Save the server config information so that we can perform 0-RTT handshake
+ // with a server.
+ void SaveQuicServerInfo();
+
private:
+ // TODO(rtenneti): |server_config_id_| is not being used, delete it.
wtc 2014/02/13 23:48:43 You can delete this TODO comment now because I jus
ramant (doing other things) 2014/02/15 00:36:12 Done.
std::string server_config_id_; // An opaque id from the server.
std::string server_config_; // A serialized handshake message.
std::string source_address_token_; // An opaque proof of IP ownership.
@@ -105,6 +118,7 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
bool server_config_valid_; // True if |server_config_| is correctly
// signed and |certs_| has been
// validated.
+ bool need_to_persist_; // Persist to disk if True.
// Generation counter associated with the |server_config_|, |certs_| and
// |server_config_sig_| combination. It is incremented whenever we set
// server_config_valid_ to false.

Powered by Google App Engine
This is Rietveld 408576698