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

Side by Side Diff: net/quic/quic_http_stream_test.cc

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 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
« no previous file with comments | « net/quic/quic_headers_stream_test.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_headers_stream_test.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698