| 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 269203489f9f8c64580acec3836c3647a933ac19..af8d139e64b2738aa08996e88cf80720fc43d720 100644
|
| --- a/net/url_request/url_request_test_util.cc
|
| +++ b/net/url_request/url_request_test_util.cc
|
| @@ -79,9 +79,10 @@ 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()));
|
| if (!ssl_config_service())
|
| - context_storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
|
| + context_storage_.set_ssl_config_service(new SSLConfigServiceDefaults());
|
| if (!http_auth_handler_factory()) {
|
| context_storage_.set_http_auth_handler_factory(
|
| HttpAuthHandlerFactory::CreateDefault(host_resolver()));
|
| @@ -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(
|
| + make_scoped_ptr(new HttpCache(new HttpNetworkSession(params),
|
| + HttpCache::DefaultBackend::InMemory(0)))
|
| + .Pass());
|
| }
|
| // In-memory cookie store.
|
| if (!cookie_store())
|
| @@ -126,10 +124,14 @@ void TestURLRequestContext::Init() {
|
| }
|
| if (!http_user_agent_settings()) {
|
| context_storage_.set_http_user_agent_settings(
|
| - new StaticHttpUserAgentSettings("en-us,fr", std::string()));
|
| + make_scoped_ptr(
|
| + new StaticHttpUserAgentSettings("en-us,fr", std::string()))
|
| + .Pass());
|
| + }
|
| + if (!job_factory()) {
|
| + context_storage_.set_job_factory(
|
| + make_scoped_ptr(new URLRequestJobFactoryImpl()).Pass());
|
| }
|
| - if (!job_factory())
|
| - context_storage_.set_job_factory(new URLRequestJobFactoryImpl);
|
| }
|
|
|
| TestURLRequestContextGetter::TestURLRequestContextGetter(
|
|
|