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

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

Issue 2766603004: QUIC: mark QUIC handshake failed if connection is closed after CryptoConnect (Closed)
Patch Set: address rch's comments 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 #include "net/quic/chromium/mock_crypto_client_stream_factory.h" 5 #include "net/quic/chromium/mock_crypto_client_stream_factory.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "net/quic/chromium/quic_chromium_client_session.h" 8 #include "net/quic/chromium/quic_chromium_client_session.h"
9 #include "net/quic/core/quic_crypto_client_stream.h" 9 #include "net/quic/core/quic_crypto_client_stream.h"
10 10
(...skipping 16 matching lines...) Expand all
27 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream( 27 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream(
28 const QuicServerId& server_id, 28 const QuicServerId& server_id,
29 QuicChromiumClientSession* session, 29 QuicChromiumClientSession* session,
30 std::unique_ptr<ProofVerifyContext> /*proof_verify_context*/, 30 std::unique_ptr<ProofVerifyContext> /*proof_verify_context*/,
31 QuicCryptoClientConfig* crypto_config) { 31 QuicCryptoClientConfig* crypto_config) {
32 const ProofVerifyDetailsChromium* proof_verify_details = nullptr; 32 const ProofVerifyDetailsChromium* proof_verify_details = nullptr;
33 if (!proof_verify_details_queue_.empty()) { 33 if (!proof_verify_details_queue_.empty()) {
34 proof_verify_details = proof_verify_details_queue_.front(); 34 proof_verify_details = proof_verify_details_queue_.front();
35 proof_verify_details_queue_.pop(); 35 proof_verify_details_queue_.pop();
36 } 36 }
37
38 if (handshake_mode_ == MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM) {
39 return new QuicCryptoClientStream(server_id, session, nullptr,
40 crypto_config, session);
41 }
Ryan Hamilton 2017/03/22 14:13:01 nit: Sorry, I should have noticed this last time.
Zhongyi Shi 2017/03/22 18:53:10 Done.
42
37 last_stream_ = new MockCryptoClientStream( 43 last_stream_ = new MockCryptoClientStream(
38 server_id, session, nullptr, *(config_.get()), crypto_config, 44 server_id, session, nullptr, *(config_.get()), crypto_config,
39 handshake_mode_, proof_verify_details); 45 handshake_mode_, proof_verify_details);
40 return last_stream_; 46 return last_stream_;
41 } 47 }
42 48
43 } // namespace net 49 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/quic_chromium_client_session.cc » ('j') | net/quic/chromium/quic_stream_factory_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698