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

Unified Diff: net/quic/crypto/quic_server_info.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: Update with TOT and handle multiple tabs loading same URL 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_server_info.h
diff --git a/net/quic/crypto/quic_server_info.h b/net/quic/crypto/quic_server_info.h
index 4a1e5c7e03bd4b84e1517a57b38ceab3fbca1887..786573d0815c2e4f9947ed53ff6de6e10dea9807 100644
--- a/net/quic/crypto/quic_server_info.h
+++ b/net/quic/crypto/quic_server_info.h
@@ -57,8 +57,11 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
void Clear();
- // TODO(rtenneti): figure out what are the data members.
- std::vector<std::string> data;
+ std::string server_config_; // A serialized handshake message.
wtc 2014/02/07 00:54:11 1. Please add a comment to document this class mat
ramant (doing other things) 2014/02/07 20:30:51 server_config_id_ is not used. Added a comment to
+ std::string source_address_token_; // An opaque proof of IP ownership.
+ std::string server_config_sig_; // A signature of |server_config_|.
+ std::vector<std::string> certs_; // A list of certificates in leaf-first
+ // order.
wtc 2014/02/07 00:54:11 Nit: it may be better to swap server_config_sig_ a
ramant (doing other things) 2014/02/07 20:30:51 Done.
private:
DISALLOW_COPY_AND_ASSIGN(State);
@@ -69,10 +72,14 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
const State& state() const;
State* mutable_state();
+ // Returns true if we have loaded the data from disk cache (disk cache had
+ // the data and that data was successfully parsed).
+ bool data_loaded() const { return data_loaded_; }
+
protected:
- // Parse parses an opaque blob of data and fills out the public member fields
- // of this object. It returns true iff the parse was successful. The public
- // member fields will be set to something sane in any case.
+ // Parse parses pickled data and fills out the public member fields of this
+ // object. It returns true iff the parse was successful. The public member
+ // fields will be set to something sane in any case.
bool Parse(const std::string& data);
std::string Serialize() const;
State state_;
@@ -83,6 +90,7 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
// This is the QUIC server hostname for which we restore the crypto_config.
const std::string hostname_;
+ bool data_loaded_;
base::WeakPtrFactory<QuicServerInfo> weak_factory_;
wtc 2014/02/07 00:54:11 This member is not being used.
ramant (doing other things) 2014/02/07 20:30:51 Done.
};

Powered by Google App Engine
This is Rietveld 408576698