diff options
Diffstat (limited to 'net/quic/quic_stream_factory_test.cc')
-rw-r--r-- | net/quic/quic_stream_factory_test.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc index 75b6e98..b5c2817 100644 --- a/net/quic/quic_stream_factory_test.cc +++ b/net/quic/quic_stream_factory_test.cc @@ -17,7 +17,7 @@ #include "net/quic/crypto/quic_decrypter.h" #include "net/quic/crypto/quic_encrypter.h" #include "net/quic/quic_http_stream.h" -#include "net/quic/quic_session_key.h" +#include "net/quic/quic_server_id.h" #include "net/quic/test_tools/mock_clock.h" #include "net/quic/test_tools/mock_crypto_client_stream_factory.h" #include "net/quic/test_tools/mock_random.h" @@ -48,17 +48,17 @@ class QuicStreamFactoryPeer { static bool HasActiveSession(QuicStreamFactory* factory, const HostPortPair& host_port_pair, bool is_https) { - QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED); - return factory->HasActiveSession(server_key); + QuicServerId server_id(host_port_pair, is_https, PRIVACY_MODE_DISABLED); + return factory->HasActiveSession(server_id); } static QuicClientSession* GetActiveSession( QuicStreamFactory* factory, const HostPortPair& host_port_pair, bool is_https) { - QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED); - DCHECK(factory->HasActiveSession(server_key)); - return factory->active_sessions_[server_key]; + QuicServerId server_id(host_port_pair, is_https, PRIVACY_MODE_DISABLED); + DCHECK(factory->HasActiveSession(server_id)); + return factory->active_sessions_[server_id]; } static scoped_ptr<QuicHttpStream> CreateIfSessionExists( @@ -66,8 +66,8 @@ class QuicStreamFactoryPeer { const HostPortPair& host_port_pair, bool is_https, const BoundNetLog& net_log) { - QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED); - return factory->CreateIfSessionExists(server_key, net_log); + QuicServerId server_id(host_port_pair, is_https, PRIVACY_MODE_DISABLED); + return factory->CreateIfSessionExists(server_id, net_log); } static bool IsLiveSession(QuicStreamFactory* factory, @@ -1092,9 +1092,9 @@ TEST_P(QuicStreamFactoryTest, SharedCryptoConfig) { HostPortPair host_port_pair1(r1_host_name, 80); QuicCryptoClientConfig* crypto_config = QuicStreamFactoryPeer::GetCryptoConfig(&factory_); - QuicSessionKey server_key1(host_port_pair1, is_https_, privacy_mode_); + QuicServerId server_id1(host_port_pair1, is_https_, privacy_mode_); QuicCryptoClientConfig::CachedState* cached1 = - crypto_config->LookupOrCreate(server_key1); + crypto_config->LookupOrCreate(server_id1); EXPECT_FALSE(cached1->proof_valid()); EXPECT_TRUE(cached1->source_address_token().empty()); @@ -1104,9 +1104,9 @@ TEST_P(QuicStreamFactoryTest, SharedCryptoConfig) { cached1->SetProofValid(); HostPortPair host_port_pair2(r2_host_name, 80); - QuicSessionKey server_key2(host_port_pair2, is_https_, privacy_mode_); + QuicServerId server_id2(host_port_pair2, is_https_, privacy_mode_); QuicCryptoClientConfig::CachedState* cached2 = - crypto_config->LookupOrCreate(server_key2); + crypto_config->LookupOrCreate(server_id2); EXPECT_EQ(cached1->source_address_token(), cached2->source_address_token()); EXPECT_TRUE(cached2->proof_valid()); } @@ -1126,9 +1126,9 @@ TEST_P(QuicStreamFactoryTest, CryptoConfigWhenProofIsInvalid) { HostPortPair host_port_pair1(r3_host_name, 80); QuicCryptoClientConfig* crypto_config = QuicStreamFactoryPeer::GetCryptoConfig(&factory_); - QuicSessionKey server_key1(host_port_pair1, is_https_, privacy_mode_); + QuicServerId server_id1(host_port_pair1, is_https_, privacy_mode_); QuicCryptoClientConfig::CachedState* cached1 = - crypto_config->LookupOrCreate(server_key1); + crypto_config->LookupOrCreate(server_id1); EXPECT_FALSE(cached1->proof_valid()); EXPECT_TRUE(cached1->source_address_token().empty()); @@ -1138,9 +1138,9 @@ TEST_P(QuicStreamFactoryTest, CryptoConfigWhenProofIsInvalid) { cached1->SetProofInvalid(); HostPortPair host_port_pair2(r4_host_name, 80); - QuicSessionKey server_key2(host_port_pair2, is_https_, privacy_mode_); + QuicServerId server_id2(host_port_pair2, is_https_, privacy_mode_); QuicCryptoClientConfig::CachedState* cached2 = - crypto_config->LookupOrCreate(server_key2); + crypto_config->LookupOrCreate(server_id2); EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); EXPECT_TRUE(cached2->source_address_token().empty()); EXPECT_FALSE(cached2->proof_valid()); |