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/quic/quic_http_stream.h" | 5 #include "net/quic/quic_http_stream.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "net/base/chunked_upload_data_stream.h" | 9 #include "net/base/chunked_upload_data_stream.h" |
10 #include "net/base/elements_upload_data_stream.h" | 10 #include "net/base/elements_upload_data_stream.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 public: | 57 public: |
58 TestQuicConnection(const QuicVersionVector& versions, | 58 TestQuicConnection(const QuicVersionVector& versions, |
59 QuicConnectionId connection_id, | 59 QuicConnectionId connection_id, |
60 IPEndPoint address, | 60 IPEndPoint address, |
61 QuicConnectionHelper* helper, | 61 QuicConnectionHelper* helper, |
62 const QuicConnection::PacketWriterFactory& writer_factory) | 62 const QuicConnection::PacketWriterFactory& writer_factory) |
63 : QuicConnection(connection_id, | 63 : QuicConnection(connection_id, |
64 address, | 64 address, |
65 helper, | 65 helper, |
66 writer_factory, | 66 writer_factory, |
67 true /* owns_writer */, | 67 true /* owns_writer */, |
68 false /* is_server */, | 68 Perspective::IS_CLIENT, |
69 false /* is_secure */, | 69 false /* is_secure */, |
70 versions) { | 70 versions) {} |
71 } | |
72 | 71 |
73 void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) { | 72 void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) { |
74 QuicConnectionPeer::SetSendAlgorithm(this, send_algorithm); | 73 QuicConnectionPeer::SetSendAlgorithm(this, send_algorithm); |
75 } | 74 } |
76 }; | 75 }; |
77 | 76 |
78 // Subclass of QuicHttpStream that closes itself when the first piece of data | 77 // Subclass of QuicHttpStream that closes itself when the first piece of data |
79 // is received. | 78 // is received. |
80 class AutoClosingStream : public QuicHttpStream { | 79 class AutoClosingStream : public QuicHttpStream { |
81 public: | 80 public: |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // Set Delegate to nullptr and make sure EffectivePriority returns highest | 751 // Set Delegate to nullptr and make sure EffectivePriority returns highest |
753 // priority. | 752 // priority. |
754 reliable_stream->SetDelegate(nullptr); | 753 reliable_stream->SetDelegate(nullptr); |
755 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 754 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
756 reliable_stream->EffectivePriority()); | 755 reliable_stream->EffectivePriority()); |
757 reliable_stream->SetDelegate(delegate); | 756 reliable_stream->SetDelegate(delegate); |
758 } | 757 } |
759 | 758 |
760 } // namespace test | 759 } // namespace test |
761 } // namespace net | 760 } // namespace net |
OLD | NEW |