Index: net/url_request/url_request_test_util.cc |
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc |
index 49df5712ad0f395ec25838a4d56e584f68222232..5ea2ccdb2debebccf6cd24a6c71bb78f1da136c9 100644 |
--- a/net/url_request/url_request_test_util.cc |
+++ b/net/url_request/url_request_test_util.cc |
@@ -79,7 +79,8 @@ void TestURLRequestContext::Init() { |
if (!cert_verifier()) |
context_storage_.set_cert_verifier(CertVerifier::CreateDefault()); |
if (!transport_security_state()) |
- context_storage_.set_transport_security_state(new TransportSecurityState); |
+ context_storage_.set_transport_security_state( |
+ make_scoped_ptr(new TransportSecurityState)); |
pauljensen
2015/08/28 13:38:03
some of these lines have "()" after constructor ca
Randy Smith (Not in Mondays)
2015/09/02 23:42:20
So I looked through the beginning of the full patc
|
if (!ssl_config_service()) |
context_storage_.set_ssl_config_service(new SSLConfigServiceDefaults); |
if (!http_auth_handler_factory()) { |
@@ -90,10 +91,6 @@ void TestURLRequestContext::Init() { |
context_storage_.set_http_server_properties( |
scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); |
} |
- if (!transport_security_state()) { |
- context_storage_.set_transport_security_state( |
- new TransportSecurityState()); |
- } |
if (http_transaction_factory()) { |
// Make sure we haven't been passed an object we're not going to use. |
EXPECT_FALSE(client_socket_factory_); |
@@ -111,9 +108,10 @@ void TestURLRequestContext::Init() { |
params.network_delegate = network_delegate(); |
params.http_server_properties = http_server_properties(); |
params.net_log = net_log(); |
- context_storage_.set_http_transaction_factory(new HttpCache( |
- new HttpNetworkSession(params), |
- HttpCache::DefaultBackend::InMemory(0))); |
+ context_storage_.set_http_transaction_factory( |
+ scoped_ptr<HttpTransactionFactory>( |
+ new HttpCache(new HttpNetworkSession(params), |
+ HttpCache::DefaultBackend::InMemory(0)))); |
} |
// In-memory cookie store. |
if (!cookie_store()) |
@@ -126,10 +124,13 @@ void TestURLRequestContext::Init() { |
} |
if (!http_user_agent_settings()) { |
context_storage_.set_http_user_agent_settings( |
- new StaticHttpUserAgentSettings("en-us,fr", std::string())); |
+ scoped_ptr<HttpUserAgentSettings>( |
+ new StaticHttpUserAgentSettings("en-us,fr", std::string()))); |
+ } |
+ if (!job_factory()) { |
+ context_storage_.set_job_factory( |
+ scoped_ptr<URLRequestJobFactory>(new URLRequestJobFactoryImpl)); |
} |
- if (!job_factory()) |
- context_storage_.set_job_factory(new URLRequestJobFactoryImpl); |
} |
TestURLRequestContextGetter::TestURLRequestContextGetter( |