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

Unified Diff: net/quic/test_tools/crypto_test_utils.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils.cc
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index d6238bdd7ce0f793974106c5995ec89ef019a643..22854bd60dbf519100f56b0f7636aae43d9cee6d 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -183,8 +183,8 @@ CryptoTestUtils::FakeClientOptions::FakeClientOptions()
int CryptoTestUtils::HandshakeWithFakeServer(
PacketSavingConnection* client_conn,
QuicCryptoClientStream* client) {
- PacketSavingConnection* server_conn =
- new PacketSavingConnection(true, client_conn->supported_versions());
+ PacketSavingConnection* server_conn = new PacketSavingConnection(
+ Perspective::IS_SERVER, client_conn->supported_versions());
TestSession server_session(server_conn, DefaultQuicConfig());
server_session.InitializeSession();
QuicCryptoServerConfig crypto_config(QuicCryptoServerConfig::TESTING,
@@ -213,7 +213,8 @@ int CryptoTestUtils::HandshakeWithFakeClient(
PacketSavingConnection* server_conn,
QuicCryptoServerStream* server,
const FakeClientOptions& options) {
- PacketSavingConnection* client_conn = new PacketSavingConnection(false);
+ PacketSavingConnection* client_conn =
+ new PacketSavingConnection(Perspective::IS_CLIENT);
// Advance the time, because timers do not like uninitialized times.
client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(1));
TestClientSession client_session(client_conn, DefaultQuicConfig());
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698