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

Unified Diff: net/quic/test_tools/mock_crypto_client_stream.h

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved HandshakeMode enum to MockCryptoClientStream Created 7 years, 8 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/test_tools/mock_crypto_client_stream.h
diff --git a/net/quic/test_tools/mock_crypto_client_stream.h b/net/quic/test_tools/mock_crypto_client_stream.h
index 2d9fdc322104e29c1ce74ad270cbadb77d2ec6f4..f244ca9595869dbb5cef10f1938c2e014213d8f2 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.h
+++ b/net/quic/test_tools/mock_crypto_client_stream.h
@@ -15,10 +15,24 @@ namespace net {
class MockCryptoClientStream : public QuicCryptoClientStream {
public:
- MockCryptoClientStream(const string& server_hostname,
- const QuicConfig& config,
- QuicSession* session,
- QuicCryptoClientConfig* crypto_config);
+ // HandshakeMode enumerates the handshake mode MockCryptoClientStream should
+ // mock in CryptoConnect.
+ enum HandshakeMode {
+ // CONFIRM_HANDSHAKE indicates that CryptoConnect will immediately confirm
+ // the handshake and establish encryption.
+ CONFIRM_HANDSHAKE,
+
+ // ZERO_RTT indicates that CryptoConnect will establish encryption but will
+ // not confirm the handshake.
+ ZERO_RTT,
+ };
+
+ MockCryptoClientStream(
+ const string& server_hostname,
+ const QuicConfig& config,
+ QuicSession* session,
+ QuicCryptoClientConfig* crypto_config,
+ HandshakeMode handshake_mode);
virtual ~MockCryptoClientStream();
// CryptoFramerVisitorInterface implementation.
@@ -27,6 +41,8 @@ class MockCryptoClientStream : public QuicCryptoClientStream {
// QuicCryptoClientStream implementation.
virtual bool CryptoConnect() OVERRIDE;
+
+ HandshakeMode handshake_mode_;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698