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

Side by Side Diff: net/quic/core/quic_crypto_server_stream_test.cc

Issue 2823223003: Rename QuicSession::GetCryptoStream() to GetMutableCryptoStream(). Add a const GetCryptoStream(). M… (Closed)
Patch Set: Created 3 years, 8 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
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/core/quic_crypto_server_stream.h" 5 #include "net/quic/core/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 CHECK(server_session); 99 CHECK(server_session);
100 server_session_.reset(server_session); 100 server_session_.reset(server_session);
101 crypto_test_utils::FakeServerOptions options; 101 crypto_test_utils::FakeServerOptions options;
102 options.token_binding_params = QuicTagVector{kTB10}; 102 options.token_binding_params = QuicTagVector{kTB10};
103 crypto_test_utils::SetupCryptoServerConfigForTest( 103 crypto_test_utils::SetupCryptoServerConfigForTest(
104 server_connection_->clock(), server_connection_->random_generator(), 104 server_connection_->clock(), server_connection_->random_generator(),
105 &server_crypto_config_, options); 105 &server_crypto_config_, options);
106 } 106 }
107 107
108 QuicCryptoServerStream* server_stream() { 108 QuicCryptoServerStream* server_stream() {
109 return server_session_->GetCryptoStream(); 109 return server_session_->GetMutableCryptoStream();
110 } 110 }
111 111
112 QuicCryptoClientStream* client_stream() { 112 QuicCryptoClientStream* client_stream() {
113 return client_session_->GetCryptoStream(); 113 return client_session_->GetMutableCryptoStream();
114 } 114 }
115 115
116 // Initializes a fake client, and all its associated state, for 116 // Initializes a fake client, and all its associated state, for
117 // testing. May be called multiple times. 117 // testing. May be called multiple times.
118 void InitializeFakeClient(bool supports_stateless_rejects) { 118 void InitializeFakeClient(bool supports_stateless_rejects) {
119 TestQuicSpdyClientSession* client_session = nullptr; 119 TestQuicSpdyClientSession* client_session = nullptr;
120 helpers_.push_back(QuicMakeUnique<MockQuicConnectionHelper>()); 120 helpers_.push_back(QuicMakeUnique<MockQuicConnectionHelper>());
121 alarm_factories_.push_back(QuicMakeUnique<MockAlarmFactory>()); 121 alarm_factories_.push_back(QuicMakeUnique<MockAlarmFactory>());
122 CreateClientSessionForTest( 122 CreateClientSessionForTest(
123 server_id_, supports_stateless_rejects, 123 server_id_, supports_stateless_rejects,
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 EXPECT_CALL( 557 EXPECT_CALL(
558 *server_connection_, 558 *server_connection_,
559 CloseConnection(QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, 559 CloseConnection(QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO,
560 "Unexpected handshake message while processing CHLO", _)); 560 "Unexpected handshake message while processing CHLO", _));
561 server_stream()->OnHandshakeMessage(chlo); 561 server_stream()->OnHandshakeMessage(chlo);
562 } 562 }
563 563
564 } // namespace 564 } // namespace
565 } // namespace test 565 } // namespace test
566 } // namespace net 566 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_crypto_client_stream_test.cc ('k') | net/quic/core/quic_server_session_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698