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

Unified Diff: net/quic/quic_network_transaction_unittest.cc

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: net/quic/quic_network_transaction_unittest.cc
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index 6c3fdfd27c90ebc3469e4cc355b35c007c89e536..4341f177a3d1149bbb3e2742a3b117f9226f7cac 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -284,6 +284,7 @@ class QuicNetworkTransactionTest
PlatformTest::TearDown();
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
base::MessageLoop::current()->RunUntilIdle();
+ session_.reset();
}
std::unique_ptr<QuicEncryptedPacket> ConstructClientConnectionClosePacket(
@@ -511,7 +512,7 @@ class QuicNetworkTransactionTest
params_.proxy_service = proxy_service_.get();
params_.ssl_config_service = ssl_config_service_.get();
params_.http_auth_handler_factory = auth_handler_factory_.get();
- params_.http_server_properties = http_server_properties_.GetWeakPtr();
+ params_.http_server_properties = &http_server_properties_;
params_.quic_supported_versions = SupportedVersions(GetParam());
for (const char* host :
{kDefaultServerHostName, "www.example.org", "news.example.org",
@@ -1013,7 +1014,7 @@ TEST_P(QuicNetworkTransactionTest, SetAlternativeServiceWithScheme) {
// header advertises alternative service for mail.example.org.
request_.url = GURL("http://mail.example.org:443");
SendRequestAndExpectHttpResponse("hello world");
- base::WeakPtr<HttpServerProperties> http_server_properties =
+ HttpServerProperties* http_server_properties =
session_->http_server_properties();
url::SchemeHostPort http_server("http", "mail.example.org", 443);
url::SchemeHostPort https_server("https", "mail.example.org", 443);
@@ -1045,7 +1046,7 @@ TEST_P(QuicNetworkTransactionTest, DoNotGetAltSvcForDifferentOrigin) {
// Send https request and set alternative services if response header
// advertises alternative service for mail.example.org.
SendRequestAndExpectHttpResponse("hello world");
- base::WeakPtr<HttpServerProperties> http_server_properties =
+ HttpServerProperties* http_server_properties =
session_->http_server_properties();
const url::SchemeHostPort https_server(request_.url);
@@ -2186,7 +2187,7 @@ class QuicNetworkTransactionWithDestinationTest
params.ssl_config_service = ssl_config_service_.get();
params.proxy_service = proxy_service_.get();
params.http_auth_handler_factory = auth_handler_factory_.get();
- params.http_server_properties = http_server_properties_.GetWeakPtr();
+ params.http_server_properties = &http_server_properties_;
params.quic_supported_versions = SupportedVersions(version_);
params.quic_host_whitelist.insert("news.example.org");
params.quic_host_whitelist.insert("mail.example.org");
@@ -2205,6 +2206,7 @@ class QuicNetworkTransactionWithDestinationTest
PlatformTest::TearDown();
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
base::MessageLoop::current()->RunUntilIdle();
+ session_.reset();
}
void SetAlternativeService(const std::string& origin) {

Powered by Google App Engine
This is Rietveld 408576698