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

Unified Diff: net/quic/quic_crypto_client_stream.h

Issue 1665743003: Refactor QuicCryptoClientStream to use QuicSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113297234
Patch Set: Created 4 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
« no previous file with comments | « net/quic/quic_client_session_base.h ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd2e7da23d32c6b86e3b0f91eb2bb6b1cdfb6e6d..16f0da9efe4e28e57c1d256135b03bd11a167e82 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -19,8 +19,6 @@
namespace net {
-class QuicClientSessionBase;
-
namespace test {
class CryptoTestUtils;
class QuicChromiumClientSessionPeer;
@@ -28,7 +26,7 @@ class QuicChromiumClientSessionPeer;
class NET_EXPORT_PRIVATE QuicCryptoClientStreamBase : public QuicCryptoStream {
public:
- explicit QuicCryptoClientStreamBase(QuicClientSessionBase* session);
+ explicit QuicCryptoClientStreamBase(QuicSession* session);
~QuicCryptoClientStreamBase() override{};
@@ -51,10 +49,31 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream
// the server being unwilling to send it without a valid source-address
// token.
static const int kMaxClientHellos = 3;
+
+ // ProofHandler is an interface that handles callbacks from the crypto
+ // stream when the client has proof verification details of the server.
+ class NET_EXPORT_PRIVATE ProofHandler {
+ public:
+ virtual ~ProofHandler() {}
+
+ // Called when the proof in |cached| is marked valid. If this is a secure
+ // QUIC session, then this will happen only after the proof verifier
+ // completes.
+ virtual void OnProofValid(
+ const QuicCryptoClientConfig::CachedState& cached) = 0;
+
+ // Called when proof verification details become available, either because
+ // proof verification is complete, or when cached details are used. This
+ // will only be called for secure QUIC connections.
+ virtual void OnProofVerifyDetailsAvailable(
+ const ProofVerifyDetails& verify_details) = 0;
+ };
+
QuicCryptoClientStream(const QuicServerId& server_id,
- QuicClientSessionBase* session,
+ QuicSession* session,
ProofVerifyContext* verify_context,
- QuicCryptoClientConfig* crypto_config);
+ QuicCryptoClientConfig* crypto_config,
+ ProofHandler* proof_handler);
~QuicCryptoClientStream() override;
@@ -183,8 +202,6 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream
// and the client config settings also allow sending a ChannelID.
bool RequiresChannelID(QuicCryptoClientConfig::CachedState* cached);
- QuicClientSessionBase* client_session();
-
State next_state_;
// num_client_hellos_ contains the number of client hello messages that this
// connection has sent.
@@ -223,6 +240,9 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream
// proof_verify_callback_ contains the callback object that we passed to an
// asynchronous proof verification. The ProofVerifier owns this object.
ProofVerifierCallbackImpl* proof_verify_callback_;
+ // proof_handler_ contains the callback object used by a quic client
+ // for proof verification. It is not owned by this class.
+ ProofHandler* proof_handler_;
// These members are used to store the result of an asynchronous proof
// verification. These members must not be used after
« no previous file with comments | « net/quic/quic_client_session_base.h ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698