| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/tools/quic/test_tools/quic_test_server.h" | 5 #include "net/tools/quic/test_tools/quic_test_server.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 if (stream_factory_) { | 51 if (stream_factory_) { |
| 52 QuicSpdyStream* stream = stream_factory_->CreateStream(id, this); | 52 QuicSpdyStream* stream = stream_factory_->CreateStream(id, this); |
| 53 ActivateStream(stream); | 53 ActivateStream(stream); |
| 54 return stream; | 54 return stream; |
| 55 } | 55 } |
| 56 return QuicSimpleServerSession::CreateIncomingDynamicStream(id); | 56 return QuicSimpleServerSession::CreateIncomingDynamicStream(id); |
| 57 } | 57 } |
| 58 | 58 |
| 59 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( | 59 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( |
| 60 const QuicCryptoServerConfig* crypto_config) override { | 60 const QuicCryptoServerConfig* crypto_config, |
| 61 QuicCompressedCertsCache* compressed_certs_cache) override { |
| 61 if (crypto_stream_factory_) { | 62 if (crypto_stream_factory_) { |
| 62 return crypto_stream_factory_->CreateCryptoStream(crypto_config, this); | 63 return crypto_stream_factory_->CreateCryptoStream(crypto_config, this); |
| 63 } | 64 } |
| 64 return QuicSimpleServerSession::CreateQuicCryptoServerStream(crypto_config); | 65 return QuicSimpleServerSession::CreateQuicCryptoServerStream( |
| 66 crypto_config, compressed_certs_cache); |
| 65 } | 67 } |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 QuicTestServer::StreamFactory* stream_factory_; // Not owned. | 70 QuicTestServer::StreamFactory* stream_factory_; // Not owned. |
| 69 QuicTestServer::CryptoStreamFactory* crypto_stream_factory_; // Not owned. | 71 QuicTestServer::CryptoStreamFactory* crypto_stream_factory_; // Not owned. |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 class QuicTestDispatcher : public QuicDispatcher { | 74 class QuicTestDispatcher : public QuicDispatcher { |
| 73 public: | 75 public: |
| 74 QuicTestDispatcher(const QuicConfig& config, | 76 QuicTestDispatcher(const QuicConfig& config, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 : QuicSimpleServerSession(config, | 178 : QuicSimpleServerSession(config, |
| 177 connection, | 179 connection, |
| 178 visitor, | 180 visitor, |
| 179 crypto_config, | 181 crypto_config, |
| 180 compressed_certs_cache) { | 182 compressed_certs_cache) { |
| 181 SendGoAway(QUIC_PEER_GOING_AWAY, ""); | 183 SendGoAway(QUIC_PEER_GOING_AWAY, ""); |
| 182 } | 184 } |
| 183 | 185 |
| 184 } // namespace test | 186 } // namespace test |
| 185 } // namespace net | 187 } // namespace net |
| OLD | NEW |