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

Unified Diff: net/quic/quic_crypto_client_stream.h

Issue 1425363002: Factor QuicCryptoClientStream APIs into QuicCryptoClientStreamBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106313860
Patch Set: Created 5 years, 1 month 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/crypto/quic_crypto_client_config.cc ('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 edfc1f58e3976ba13946406b0aa230fb3e9e6052..6f98ab7703f63972c9b00add8c4bd45c6eadceb0 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -23,7 +23,22 @@ class CryptoTestUtils;
class QuicChromiumClientSessionPeer;
} // namespace test
-class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
+class NET_EXPORT_PRIVATE QuicCryptoClientStreamBase : public QuicCryptoStream {
+ public:
+ explicit QuicCryptoClientStreamBase(QuicClientSessionBase* session);
+
+ ~QuicCryptoClientStreamBase() override {};
+
+ // Performs a crypto handshake with the server.
+ virtual void CryptoConnect() = 0;
+
+ // num_sent_client_hellos returns the number of client hello messages that
+ // have been sent. If the handshake has completed then this is one greater
+ // than the number of round-trips needed for the handshake.
+ virtual int num_sent_client_hellos() const = 0;
+};
+
+class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoClientStreamBase {
public:
// kMaxClientHellos is the maximum number of times that we'll send a client
// hello. The value 3 accounts for:
@@ -32,24 +47,20 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
// the server being unwilling to send it without a valid source-address
// token.
static const int kMaxClientHellos = 3;
-
QuicCryptoClientStream(const QuicServerId& server_id,
QuicClientSessionBase* session,
ProofVerifyContext* verify_context,
QuicCryptoClientConfig* crypto_config);
+
~QuicCryptoClientStream() override;
+ // From QuicCryptoClientStreamBase
+ void CryptoConnect() override;
+ int num_sent_client_hellos() const override;
+
// CryptoFramerVisitorInterface implementation
void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
- // Performs a crypto handshake with the server.
- virtual void CryptoConnect();
-
- // num_sent_client_hellos returns the number of client hello messages that
- // have been sent. If the handshake has completed then this is one greater
- // than the number of round-trips needed for the handshake.
- int num_sent_client_hellos() const;
-
// Returns true if a channel ID was sent on this connection.
bool WasChannelIDSent() const;
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698