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

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: Deleted unused data_loaded_ member 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..4458eeb74a215566f6c7fc743e8492d55a68c730 100644
--- a/net/quic/crypto/quic_crypto_client_config.h
+++ b/net/quic/crypto/quic_crypto_client_config.h
@@ -83,6 +83,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 +96,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.
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 +116,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