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

Side by Side Diff: net/quic/chromium/mock_crypto_client_stream_factory.h

Issue 2766603004: QUIC: mark QUIC handshake failed if connection is closed after CryptoConnect (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_CHROMIUM_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ 5 #ifndef NET_QUIC_CHROMIUM_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_
6 #define NET_QUIC_CHROMIUM_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ 6 #define NET_QUIC_CHROMIUM_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 27 matching lines...) Expand all
38 void AddProofVerifyDetails( 38 void AddProofVerifyDetails(
39 const ProofVerifyDetailsChromium* proof_verify_details) { 39 const ProofVerifyDetailsChromium* proof_verify_details) {
40 proof_verify_details_queue_.push(proof_verify_details); 40 proof_verify_details_queue_.push(proof_verify_details);
41 } 41 }
42 42
43 MockCryptoClientStream* last_stream() const { return last_stream_; } 43 MockCryptoClientStream* last_stream() const { return last_stream_; }
44 44
45 // Sets initial config for new sessions. 45 // Sets initial config for new sessions.
46 void SetConfig(const QuicConfig& config); 46 void SetConfig(const QuicConfig& config);
47 47
48 void set_use_normal_crypto_stream() { use_normal_crypto_stream_ = true; }
49
48 private: 50 private:
49 MockCryptoClientStream::HandshakeMode handshake_mode_; 51 MockCryptoClientStream::HandshakeMode handshake_mode_;
50 MockCryptoClientStream* last_stream_; 52 MockCryptoClientStream* last_stream_;
51 std::queue<const ProofVerifyDetailsChromium*> proof_verify_details_queue_; 53 std::queue<const ProofVerifyDetailsChromium*> proof_verify_details_queue_;
52 std::unique_ptr<QuicConfig> config_; 54 std::unique_ptr<QuicConfig> config_;
55 // Once set to ture, will generate QuicCryptoClientStream in stead of
56 // MockCryptoClientStream in tests.
Ryan Hamilton 2017/03/22 02:38:48 nit: Instead of adding a new member for this which
57 bool use_normal_crypto_stream_;
53 58
54 DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStreamFactory); 59 DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStreamFactory);
55 }; 60 };
56 61
57 } // namespace net 62 } // namespace net
58 63
59 #endif // NET_QUIC_CHROMIUM_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_ 64 #endif // NET_QUIC_CHROMIUM_MOCK_CRYPTO_CLIENT_STREAM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698