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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.cc

Issue 393953009: Moving the work currently done in the QuicSession constructor to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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/tools/quic/test_tools/quic_test_utils.h" 5 #include "net/tools/quic/test_tools/quic_test_utils.h"
6 6
7 #include "net/quic/quic_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/test_tools/quic_connection_peer.h" 8 #include "net/quic/test_tools/quic_connection_peer.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
10 #include "net/tools/quic/quic_epoll_connection_helper.h" 10 #include "net/tools/quic/quic_epoll_connection_helper.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 least_unacked); 73 least_unacked);
74 // Add enough missing packets to get num_nack_ranges nack ranges. 74 // Add enough missing packets to get num_nack_ranges nack ranges.
75 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) { 75 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) {
76 ack.received_info.missing_packets.insert(least_unacked + i); 76 ack.received_info.missing_packets.insert(least_unacked + i);
77 } 77 }
78 return ack; 78 return ack;
79 } 79 }
80 80
81 TestSession::TestSession(QuicConnection* connection, 81 TestSession::TestSession(QuicConnection* connection,
82 const QuicConfig& config) 82 const QuicConfig& config)
83 : QuicSession(connection, config), 83 : QuicSession(connection, config),
84 crypto_stream_(NULL) { 84 crypto_stream_(NULL) {
85 InitializeSession();
85 } 86 }
86 87
87 TestSession::~TestSession() {} 88 TestSession::~TestSession() {}
88 89
89 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { 90 void TestSession::SetCryptoStream(QuicCryptoStream* stream) {
90 crypto_stream_ = stream; 91 crypto_stream_ = stream;
91 } 92 }
92 93
93 QuicCryptoStream* TestSession::GetCryptoStream() { 94 QuicCryptoStream* TestSession::GetCryptoStream() {
94 return crypto_stream_; 95 return crypto_stream_;
(...skipping 13 matching lines...) Expand all
108 109
109 MockAckNotifierDelegate::MockAckNotifierDelegate() { 110 MockAckNotifierDelegate::MockAckNotifierDelegate() {
110 } 111 }
111 112
112 MockAckNotifierDelegate::~MockAckNotifierDelegate() { 113 MockAckNotifierDelegate::~MockAckNotifierDelegate() {
113 } 114 }
114 115
115 } // namespace test 116 } // namespace test
116 } // namespace tools 117 } // namespace tools
117 } // namespace net 118 } // namespace net
OLDNEW
« net/quic/quic_client_session.cc ('K') | « net/tools/quic/quic_spdy_client_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698