Chromium Code Reviews| 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 |