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

Unified Diff: net/quic/quic_crypto_client_stream.h

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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/quic_connection_test.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..634b281bb2b7ce1b04c144d7def40566497662f6 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -23,7 +23,23 @@ 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 +48,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;
@@ -128,8 +140,7 @@ class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
void DoInitialize(QuicCryptoClientConfig::CachedState* cached);
// Send either InchoateClientHello or ClientHello message to the server.
- void DoSendCHLO(const CryptoHandshakeMessage* in,
- QuicCryptoClientConfig::CachedState* cached);
+ void DoSendCHLO(QuicCryptoClientConfig::CachedState* cached);
// Process REJ message from the server.
void DoReceiveREJ(const CryptoHandshakeMessage* in,
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698