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

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

Issue 1665743003: Refactor QuicCryptoClientStream to use QuicSession directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113297234
Patch Set: Created 4 years, 10 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/test_tools/mock_crypto_client_stream.cc ('k') | net/tools/quic/end_to_end_test.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/sha1.h" 7 #include "base/sha1.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/quic/crypto/crypto_framer.h" 10 #include "net/quic/crypto/crypto_framer.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 351
352 TestQuicSpdyClientSession::TestQuicSpdyClientSession( 352 TestQuicSpdyClientSession::TestQuicSpdyClientSession(
353 QuicConnection* connection, 353 QuicConnection* connection,
354 const QuicConfig& config, 354 const QuicConfig& config,
355 const QuicServerId& server_id, 355 const QuicServerId& server_id,
356 QuicCryptoClientConfig* crypto_config) 356 QuicCryptoClientConfig* crypto_config)
357 : QuicClientSessionBase(connection, &promised_by_url_, config) { 357 : QuicClientSessionBase(connection, &promised_by_url_, config) {
358 crypto_stream_.reset(new QuicCryptoClientStream( 358 crypto_stream_.reset(new QuicCryptoClientStream(
359 server_id, this, CryptoTestUtils::ProofVerifyContextForTesting(), 359 server_id, this, CryptoTestUtils::ProofVerifyContextForTesting(),
360 crypto_config)); 360 crypto_config, this));
361 Initialize(); 361 Initialize();
362 } 362 }
363 363
364 TestQuicSpdyClientSession::~TestQuicSpdyClientSession() {} 364 TestQuicSpdyClientSession::~TestQuicSpdyClientSession() {}
365 365
366 QuicCryptoClientStream* TestQuicSpdyClientSession::GetCryptoStream() { 366 QuicCryptoClientStream* TestQuicSpdyClientSession::GetCryptoStream() {
367 return crypto_stream_.get(); 367 return crypto_stream_.get();
368 } 368 }
369 369
370 MockPacketWriter::MockPacketWriter() { 370 MockPacketWriter::MockPacketWriter() {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // strike register worries that we've just overflowed a uint32_t time. 791 // strike register worries that we've just overflowed a uint32_t time.
792 (*server_connection)->AdvanceTime(connection_start_time); 792 (*server_connection)->AdvanceTime(connection_start_time);
793 } 793 }
794 794
795 QuicStreamId QuicClientDataStreamId(int i) { 795 QuicStreamId QuicClientDataStreamId(int i) {
796 return kClientDataStreamId1 + 2 * i; 796 return kClientDataStreamId1 + 2 * i;
797 } 797 }
798 798
799 } // namespace test 799 } // namespace test
800 } // namespace net 800 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/mock_crypto_client_stream.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698