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

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: 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_server_info.h
diff --git a/net/quic/crypto/quic_server_info.h b/net/quic/crypto/quic_server_info.h
index 4a1e5c7e03bd4b84e1517a57b38ceab3fbca1887..7f1ef7535c0e9dd859c36074dd8760bd3e59aba9 100644
--- a/net/quic/crypto/quic_server_info.h
+++ b/net/quic/crypto/quic_server_info.h
@@ -44,6 +44,10 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
// but, obviously, a callback will never be made.
virtual int WaitForDataReady(const CompletionCallback& callback) = 0;
+ // Returns true is data is loaded from disk cache and ready (WaitForDataReady
wtc 2014/02/11 01:01:45 Typo: is data is => if data is
ramant (doing other things) 2014/02/11 07:57:55 Done.
+ // doesn't have a pending callback).
+ virtual bool IsDataReady() = 0;
+
// Persist allows for the server information to be updated for future users.
// This is a fire and forget operation: the caller may drop its reference
// from this object and the store operation will still complete. This can
@@ -57,8 +61,12 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
void Clear();
- // TODO(rtenneti): figure out what are the data members.
- std::vector<std::string> data;
+ // This class matches QuicClientCryptoConfig::CachedState.
+ std::string server_config_; // A serialized handshake message.
+ std::string source_address_token_; // An opaque proof of IP ownership.
+ std::vector<std::string> certs_; // A list of certificates in leaf-first
+ // order.
+ std::string server_config_sig_; // A signature of |server_config_|.
wtc 2014/02/11 01:01:45 These members should follow the naming convention
ramant (doing other things) 2014/02/11 07:57:55 Done.
private:
DISALLOW_COPY_AND_ASSIGN(State);
@@ -70,9 +78,9 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
State* mutable_state();
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,7 +91,6 @@ class NET_EXPORT_PRIVATE QuicServerInfo {
// This is the QUIC server hostname for which we restore the crypto_config.
const std::string hostname_;
- base::WeakPtrFactory<QuicServerInfo> weak_factory_;
};
class QuicServerInfoFactory {

Powered by Google App Engine
This is Rietveld 408576698