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

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

Issue 14718011: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698