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

Side by Side Diff: net/quic/test_tools/mock_crypto_client_stream_factory.cc

Issue 1680243005: Make QUIC tests use certs which are valid for the hosts they connect to. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « net/quic/test_tools/mock_crypto_client_stream_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/quic/test_tools/mock_crypto_client_stream_factory.h" 5 #include "net/quic/test_tools/mock_crypto_client_stream_factory.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "net/quic/quic_chromium_client_session.h" 8 #include "net/quic/quic_chromium_client_session.h"
9 #include "net/quic/quic_crypto_client_stream.h" 9 #include "net/quic/quic_crypto_client_stream.h"
10 #include "net/quic/quic_server_id.h" 10 #include "net/quic/quic_server_id.h"
11 11
12 using std::string; 12 using std::string;
13 13
14 namespace net { 14 namespace net {
15 15
16 MockCryptoClientStreamFactory::~MockCryptoClientStreamFactory() {} 16 MockCryptoClientStreamFactory::~MockCryptoClientStreamFactory() {}
17 17
18 MockCryptoClientStreamFactory::MockCryptoClientStreamFactory() 18 MockCryptoClientStreamFactory::MockCryptoClientStreamFactory()
19 : handshake_mode_(MockCryptoClientStream::CONFIRM_HANDSHAKE), 19 : handshake_mode_(MockCryptoClientStream::CONFIRM_HANDSHAKE),
20 last_stream_(nullptr) {} 20 last_stream_(nullptr) {}
21 21
22 QuicCryptoClientStream* 22 QuicCryptoClientStream*
23 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream( 23 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream(
24 const QuicServerId& server_id, 24 const QuicServerId& server_id,
25 QuicChromiumClientSession* session, 25 QuicChromiumClientSession* session,
26 scoped_ptr<ProofVerifyContext> /*proof_verify_context*/, 26 scoped_ptr<ProofVerifyContext> /*proof_verify_context*/,
27 QuicCryptoClientConfig* crypto_config) { 27 QuicCryptoClientConfig* crypto_config) {
28 const ProofVerifyDetails* proof_verify_details = nullptr; 28 const ProofVerifyDetailsChromium* proof_verify_details = nullptr;
29 if (!proof_verify_details_queue_.empty()) { 29 if (!proof_verify_details_queue_.empty()) {
30 proof_verify_details = proof_verify_details_queue_.front(); 30 proof_verify_details = proof_verify_details_queue_.front();
31 proof_verify_details_queue_.pop(); 31 proof_verify_details_queue_.pop();
32 } 32 }
33 last_stream_ = 33 last_stream_ =
34 new MockCryptoClientStream(server_id, session, nullptr, crypto_config, 34 new MockCryptoClientStream(server_id, session, nullptr, crypto_config,
35 handshake_mode_, proof_verify_details); 35 handshake_mode_, proof_verify_details);
36 return last_stream_; 36 return last_stream_;
37 } 37 }
38 38
39 } // namespace net 39 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/mock_crypto_client_stream_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698