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

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

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: zero rtt test 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_factory.h
diff --git a/net/quic/test_tools/mock_crypto_client_stream_factory.h b/net/quic/test_tools/mock_crypto_client_stream_factory.h
index 445e7667cc6f8225e1f9698ced14c80319910637..7bf10380daf1e6596dda2aacae5b380be82626da 100644
--- a/net/quic/test_tools/mock_crypto_client_stream_factory.h
+++ b/net/quic/test_tools/mock_crypto_client_stream_factory.h
@@ -15,6 +15,20 @@ namespace net {
class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory {
public:
+ // HandshakeMode enumerates the handshake mode MockCryptoClientStream should
Ryan Hamilton 2013/05/01 23:47:32 nit: please move this enum to the mock stream (out
ramant (doing other things) 2013/05/02 00:08:05 Done.
+ // mock in CryptoConnect.
+ enum HandshakeMode {
+ // CONFIRM_HANDSHAKE indicates that during CryptoConnect, we will set
+ // encryption_established_ to true but handshake_confirmed_ to true.
Ryan Hamilton 2013/05/01 23:47:32 // CONFIRM_HANDSHAKE indicates that CryptoConnect
ramant (doing other things) 2013/05/02 00:08:05 Done.
+ CONFIRM_HANDSHAKE,
+
+ // ZERO_RTT indicates that during CryptoConnect, we will set
+ // encryption_established_ to true but handshake_confirmed_ to false.
Ryan Hamilton 2013/05/01 23:47:32 // ZERO_RTT indicates that CryptoConnect will esta
ramant (doing other things) 2013/05/02 00:08:05 Done.
+ ZERO_RTT,
+ };
+
+ MockCryptoClientStreamFactory();
+
virtual ~MockCryptoClientStreamFactory() {}
virtual QuicCryptoClientStream* CreateQuicCryptoClientStream(
@@ -22,6 +36,13 @@ class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory {
const QuicConfig& config,
QuicSession* session,
QuicCryptoClientConfig* crypto_config) OVERRIDE;
+
+ void set_handshake_mode(HandshakeMode handshake_mode) {
+ handshake_mode_ = handshake_mode;
+ }
+
+ private:
+ HandshakeMode handshake_mode_;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698