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

Unified Diff: net/http/http_stream_factory_impl_unittest.cc

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/crypto/properties_based_quic_server_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_unittest.cc
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 198569b28ec57188ea68f1f608733afb6220b7b6..943528a698fbdd11339a243d5105a17db44ad2e5 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -695,7 +695,7 @@ TEST_P(HttpStreamFactoryTest, UnreachableQuicProxyMarkedAsBad) {
params.transport_security_state = &transport_security_state;
params.proxy_service = proxy_service.get();
params.ssl_config_service = ssl_config_service.get();
- params.http_server_properties = http_server_properties.GetWeakPtr();
+ params.http_server_properties = &http_server_properties;
std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
session->quic_stream_factory()->set_require_confirmation(false);
@@ -819,7 +819,7 @@ TEST_P(HttpStreamFactoryTest, QuicLossyProxyMarkedAsBad) {
params.transport_security_state = &transport_security_state;
params.proxy_service = proxy_service.get();
params.ssl_config_service = ssl_config_service.get();
- params.http_server_properties = http_server_properties.GetWeakPtr();
+ params.http_server_properties = &http_server_properties;
params.quic_max_number_of_lossy_connections = 2;
std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
@@ -884,7 +884,7 @@ TEST_P(HttpStreamFactoryTest, UsePreConnectIfNoZeroRTT) {
SpdySessionDependencies::CreateSessionParams(&session_deps);
params.enable_quic = true;
params.quic_disable_preconnect_if_0rtt = true;
- params.http_server_properties = http_server_properties.GetWeakPtr();
+ params.http_server_properties = &http_server_properties;
std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
HttpNetworkSessionPeer peer(session.get());
@@ -929,7 +929,7 @@ TEST_P(HttpStreamFactoryTest, QuicDisablePreConnectIfZeroRtt) {
SpdySessionDependencies::CreateSessionParams(&session_deps);
params.enable_quic = true;
params.quic_disable_preconnect_if_0rtt = true;
- params.http_server_properties = http_server_properties.GetWeakPtr();
+ params.http_server_properties = &http_server_properties;
std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
@@ -1493,6 +1493,8 @@ class HttpStreamFactoryBidirectionalQuicTest
clock_->AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
}
+ void TearDown() override { session_.reset(); }
+
// Disable bidirectional stream over QUIC. This should be invoked before
// Initialize().
void DisableQuicBidirectionalStream() {
@@ -1501,7 +1503,7 @@ class HttpStreamFactoryBidirectionalQuicTest
void Initialize() {
params_.enable_quic = true;
- params_.http_server_properties = http_server_properties_.GetWeakPtr();
+ params_.http_server_properties = &http_server_properties_;
params_.quic_host_whitelist.insert("www.example.org");
params_.quic_random = &random_generator_;
params_.quic_clock = clock_;
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/crypto/properties_based_quic_server_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698