| Index: net/http/http_network_transaction_unittest.cc
|
| diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
|
| index 8446b0461bb11c74813bfa2df5bf55e9320cf641..bbb1d07b35d36bd6b83678aa2ac806b66537b9d8 100644
|
| --- a/net/http/http_network_transaction_unittest.cc
|
| +++ b/net/http/http_network_transaction_unittest.cc
|
| @@ -9071,7 +9071,7 @@ std::unique_ptr<HttpNetworkSession> SetupSessionForGroupNameTests(
|
| SpdySessionDependencies* session_deps_) {
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(next_proto), "", 443);
|
| @@ -9962,10 +9962,10 @@ TEST_P(HttpNetworkTransactionTest, HonorAlternativeServiceHeader) {
|
| EXPECT_EQ(ERR_IO_PENDING, rv);
|
|
|
| url::SchemeHostPort test_server("http", "www.example.org", 80);
|
| - HttpServerProperties& http_server_properties =
|
| - *session->http_server_properties();
|
| + HttpServerProperties* http_server_properties =
|
| + session->http_server_properties();
|
| AlternativeServiceVector alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| EXPECT_TRUE(alternative_service_vector.empty());
|
|
|
| EXPECT_EQ(OK, callback.WaitForResult());
|
| @@ -9982,7 +9982,7 @@ TEST_P(HttpNetworkTransactionTest, HonorAlternativeServiceHeader) {
|
| EXPECT_EQ("hello world", response_data);
|
|
|
| alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| ASSERT_EQ(1u, alternative_service_vector.size());
|
| EXPECT_EQ(AlternateProtocolFromNextProto(GetProtocol()),
|
| alternative_service_vector[0].protocol);
|
| @@ -10021,10 +10021,10 @@ TEST_P(HttpNetworkTransactionTest,
|
| new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
|
|
|
| url::SchemeHostPort test_server(request.url);
|
| - HttpServerProperties& http_server_properties =
|
| - *session->http_server_properties();
|
| + HttpServerProperties* http_server_properties =
|
| + session->http_server_properties();
|
| AlternativeServiceVector alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| EXPECT_TRUE(alternative_service_vector.empty());
|
|
|
| int rv = trans->Start(&request, callback.callback(), BoundNetLog());
|
| @@ -10043,7 +10043,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| EXPECT_EQ("hello world", response_data);
|
|
|
| alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| EXPECT_TRUE(alternative_service_vector.empty());
|
| }
|
|
|
| @@ -10074,7 +10074,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), "different.example.org",
|
| @@ -10118,7 +10118,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), "", 444);
|
| @@ -10140,15 +10140,15 @@ TEST_P(HttpNetworkTransactionTest, ClearAlternativeServices) {
|
|
|
| // Set an alternative service for origin.
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - HttpServerProperties& http_server_properties =
|
| - *session->http_server_properties();
|
| + HttpServerProperties* http_server_properties =
|
| + session->http_server_properties();
|
| url::SchemeHostPort test_server("http", "www.example.org", 80);
|
| AlternativeService alternative_service(QUIC, "", 80);
|
| base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
|
| - http_server_properties.SetAlternativeService(test_server, alternative_service,
|
| - expiration);
|
| + http_server_properties->SetAlternativeService(
|
| + test_server, alternative_service, expiration);
|
| AlternativeServiceVector alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| EXPECT_EQ(1u, alternative_service_vector.size());
|
|
|
| // Send a clear header.
|
| @@ -10187,7 +10187,7 @@ TEST_P(HttpNetworkTransactionTest, ClearAlternativeServices) {
|
| EXPECT_EQ("hello world", response_data);
|
|
|
| alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| EXPECT_TRUE(alternative_service_vector.empty());
|
| }
|
|
|
| @@ -10224,10 +10224,10 @@ TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeader) {
|
| EXPECT_EQ(ERR_IO_PENDING, rv);
|
|
|
| url::SchemeHostPort test_server("http", "www.example.org", 80);
|
| - HttpServerProperties& http_server_properties =
|
| - *session->http_server_properties();
|
| + HttpServerProperties* http_server_properties =
|
| + session->http_server_properties();
|
| AlternativeServiceVector alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| EXPECT_TRUE(alternative_service_vector.empty());
|
|
|
| EXPECT_EQ(OK, callback.WaitForResult());
|
| @@ -10244,7 +10244,7 @@ TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeader) {
|
| EXPECT_EQ("hello world", response_data);
|
|
|
| alternative_service_vector =
|
| - http_server_properties.GetAlternativeServices(test_server);
|
| + http_server_properties->GetAlternativeServices(test_server);
|
| ASSERT_EQ(2u, alternative_service_vector.size());
|
| EXPECT_EQ(AlternateProtocolFromNextProto(GetProtocol()),
|
| alternative_service_vector[0].protocol);
|
| @@ -10281,7 +10281,7 @@ TEST_P(HttpNetworkTransactionTest, DisableAlternativeServiceToDifferentHost) {
|
|
|
| std::unique_ptr<HttpNetworkSession> session = CreateSession(&session_deps_);
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), "different.example.org",
|
| @@ -10336,7 +10336,7 @@ TEST_P(HttpNetworkTransactionTest, IdentifyQuicBroken) {
|
| // Set up a QUIC alternative service for server.
|
| session_deps_.enable_alternative_service_with_different_host = false;
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(QUIC, alternative);
|
| base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
|
| @@ -10396,7 +10396,7 @@ TEST_P(HttpNetworkTransactionTest, IdentifyQuicNotBroken) {
|
|
|
| session_deps_.enable_alternative_service_with_different_host = true;
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
|
|
| // Set up two QUIC alternative services for server.
|
| @@ -10461,7 +10461,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const url::SchemeHostPort server(request.url);
|
| // Port must be < 1024, or the header will be ignored (since initial port was
|
| @@ -10527,7 +10527,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const int kUnrestrictedAlternatePort = 1024;
|
| AlternativeService alternative_service(
|
| @@ -10579,7 +10579,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const int kUnrestrictedAlternatePort = 1024;
|
| AlternativeService alternative_service(
|
| @@ -10630,7 +10630,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const int kRestrictedAlternatePort = 80;
|
| AlternativeService alternative_service(
|
| @@ -10682,7 +10682,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const int kRestrictedAlternatePort = 80;
|
| AlternativeService alternative_service(
|
| @@ -10733,7 +10733,7 @@ TEST_P(HttpNetworkTransactionTest,
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const int kUnrestrictedAlternatePort = 1025;
|
| AlternativeService alternative_service(
|
| @@ -10779,7 +10779,7 @@ TEST_P(HttpNetworkTransactionTest, AlternateProtocolUnsafeBlocked) {
|
|
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| const int kUnsafePort = 7;
|
| AlternativeService alternative_service(
|
| @@ -13511,7 +13511,7 @@ class AltSvcCertificateVerificationTest : public HttpNetworkTransactionTest {
|
|
|
| session_deps_.enable_alternative_service_with_different_host = true;
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), alternative);
|
| @@ -13616,7 +13616,7 @@ TEST_P(HttpNetworkTransactionTest, AlternativeServiceNotOnHttp11) {
|
| // Set up alternative service for server.
|
| session_deps_.enable_alternative_service_with_different_host = true;
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), alternative);
|
| @@ -13687,7 +13687,7 @@ TEST_P(HttpNetworkTransactionTest, FailedAlternativeServiceIsNotUserVisible) {
|
| // Set up alternative service for server.
|
| session_deps_.enable_alternative_service_with_different_host = true;
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), alternative);
|
| @@ -13796,7 +13796,7 @@ TEST_P(HttpNetworkTransactionTest, AlternativeServiceShouldNotPoolToHttp11) {
|
| // Set up alternative service for server.
|
| session_deps_.enable_alternative_service_with_different_host = false;
|
| std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| - base::WeakPtr<HttpServerProperties> http_server_properties =
|
| + HttpServerProperties* http_server_properties =
|
| session->http_server_properties();
|
| AlternativeService alternative_service(
|
| AlternateProtocolFromNextProto(GetProtocol()), alternative);
|
|
|