| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quic_simple_server_session.h" | 5 #include "net/tools/quic/quic_simple_server_session.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "net/quic/proto/cached_network_parameters.pb.h" | 9 #include "net/quic/proto/cached_network_parameters.pb.h" |
| 10 #include "net/quic/quic_connection.h" | 10 #include "net/quic/quic_connection.h" |
| 11 #include "net/quic/quic_flags.h" | 11 #include "net/quic/quic_flags.h" |
| 12 #include "net/quic/quic_spdy_session.h" | 12 #include "net/quic/quic_spdy_session.h" |
| 13 #include "net/quic/reliable_quic_stream.h" | 13 #include "net/quic/reliable_quic_stream.h" |
| 14 #include "net/tools/quic/quic_simple_server_stream.h" | 14 #include "net/tools/quic/quic_simple_server_stream.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 QuicSimpleServerSession::QuicSimpleServerSession( | 19 QuicSimpleServerSession::QuicSimpleServerSession( |
| 20 const QuicConfig& config, | 20 const QuicConfig& config, |
| 21 QuicConnection* connection, | 21 QuicConnection* connection, |
| 22 QuicServerSessionVisitor* visitor, | 22 QuicServerSessionVisitor* visitor, |
| 23 const QuicCryptoServerConfig* crypto_config) | 23 const QuicCryptoServerConfig* crypto_config, |
| 24 : QuicServerSessionBase(config, connection, visitor, crypto_config), | 24 QuicCompressedCertsCache* compressed_certs_cache) |
| 25 : QuicServerSessionBase(config, |
| 26 connection, |
| 27 visitor, |
| 28 crypto_config, |
| 29 compressed_certs_cache), |
| 25 highest_promised_stream_id_(0) {} | 30 highest_promised_stream_id_(0) {} |
| 26 | 31 |
| 27 QuicSimpleServerSession::~QuicSimpleServerSession() {} | 32 QuicSimpleServerSession::~QuicSimpleServerSession() {} |
| 28 | 33 |
| 29 QuicCryptoServerStreamBase* | 34 QuicCryptoServerStreamBase* |
| 30 QuicSimpleServerSession::CreateQuicCryptoServerStream( | 35 QuicSimpleServerSession::CreateQuicCryptoServerStream( |
| 31 const QuicCryptoServerConfig* crypto_config) { | 36 const QuicCryptoServerConfig* crypto_config) { |
| 32 return new QuicCryptoServerStream( | 37 return new QuicCryptoServerStream( |
| 33 crypto_config, FLAGS_enable_quic_stateless_reject_support, this); | 38 crypto_config, FLAGS_enable_quic_stateless_reject_support, this); |
| 34 } | 39 } |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 DVLOG(1) << "created server push stream " << promised_stream->id(); | 184 DVLOG(1) << "created server push stream " << promised_stream->id(); |
| 180 | 185 |
| 181 const SpdyHeaderBlock request_headers(promised_info.request_headers); | 186 const SpdyHeaderBlock request_headers(promised_info.request_headers); |
| 182 | 187 |
| 183 promised_streams_.pop_front(); | 188 promised_streams_.pop_front(); |
| 184 promised_stream->PushResponse(request_headers); | 189 promised_stream->PushResponse(request_headers); |
| 185 } | 190 } |
| 186 } | 191 } |
| 187 | 192 |
| 188 } // namespace net | 193 } // namespace net |
| OLD | NEW |