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

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

Issue 102313005: Remove the is_server argument from the QuicSession constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_client_session.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/test_tools/quic_test_utils.h" 5 #include "net/quic/test_tools/quic_test_utils.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/crypto/crypto_framer.h" 9 #include "net/quic/crypto/crypto_framer.h"
10 #include "net/quic/crypto/crypto_handshake.h" 10 #include "net/quic/crypto/crypto_handshake.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 EncryptionLevel level, 282 EncryptionLevel level,
283 const SerializedPacket& packet, 283 const SerializedPacket& packet,
284 TransmissionType transmission_type) { 284 TransmissionType transmission_type) {
285 packets_.push_back(packet.packet); 285 packets_.push_back(packet.packet);
286 QuicEncryptedPacket* encrypted = 286 QuicEncryptedPacket* encrypted =
287 framer_.EncryptPacket(level, packet.sequence_number, *packet.packet); 287 framer_.EncryptPacket(level, packet.sequence_number, *packet.packet);
288 encrypted_packets_.push_back(encrypted); 288 encrypted_packets_.push_back(encrypted);
289 return true; 289 return true;
290 } 290 }
291 291
292 MockSession::MockSession(QuicConnection* connection, bool is_server) 292 MockSession::MockSession(QuicConnection* connection)
293 : QuicSession(connection, DefaultQuicConfig(), is_server) { 293 : QuicSession(connection, DefaultQuicConfig()) {
294 ON_CALL(*this, WritevData(_, _, _, _, _, _)) 294 ON_CALL(*this, WritevData(_, _, _, _, _, _))
295 .WillByDefault(testing::Return(QuicConsumedData(0, false))); 295 .WillByDefault(testing::Return(QuicConsumedData(0, false)));
296 } 296 }
297 297
298 MockSession::~MockSession() { 298 MockSession::~MockSession() {
299 } 299 }
300 300
301 TestSession::TestSession(QuicConnection* connection, 301 TestSession::TestSession(QuicConnection* connection,
302 const QuicConfig& config) 302 const QuicConfig& config)
303 : QuicSession(connection, config, connection->is_server()), 303 : QuicSession(connection, config),
304 crypto_stream_(NULL) { 304 crypto_stream_(NULL) {
305 } 305 }
306 306
307 TestSession::~TestSession() {} 307 TestSession::~TestSession() {}
308 308
309 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { 309 void TestSession::SetCryptoStream(QuicCryptoStream* stream) {
310 crypto_stream_ = stream; 310 crypto_stream_ = stream;
311 } 311 }
312 312
313 QuicCryptoStream* TestSession::GetCryptoStream() { 313 QuicCryptoStream* TestSession::GetCryptoStream() {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 data.AppendToString(&data_); 516 data.AppendToString(&data_);
517 return true; 517 return true;
518 } 518 }
519 519
520 void TestDecompressorVisitor::OnDecompressionError() { 520 void TestDecompressorVisitor::OnDecompressionError() {
521 error_ = true; 521 error_ = true;
522 } 522 }
523 523
524 } // namespace test 524 } // namespace test
525 } // namespace net 525 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698