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

Unified Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 years, 3 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_unittest.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_script_fetcher_impl_unittest.cc
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index 0ffe0c0f2c37d72626557f83dc6d46ae62f78660..3dfd3ce87155ab000b36633bc23473bb903834c7 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -61,8 +61,9 @@ class RequestContext : public URLRequestContext {
RequestContext() : storage_(this) {
ProxyConfig no_proxy;
storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver));
- storage_.set_cert_verifier(new MockCertVerifier);
- storage_.set_transport_security_state(new TransportSecurityState);
+ storage_.set_cert_verifier(make_scoped_ptr(new MockCertVerifier).Pass());
+ storage_.set_transport_security_state(
+ make_scoped_ptr(new TransportSecurityState));
storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy));
storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
storage_.set_http_server_properties(
@@ -77,15 +78,18 @@ class RequestContext : public URLRequestContext {
params.http_server_properties = http_server_properties();
scoped_refptr<HttpNetworkSession> network_session(
new HttpNetworkSession(params));
- storage_.set_http_transaction_factory(new HttpCache(
- network_session.get(), HttpCache::DefaultBackend::InMemory(0)));
- URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl();
+ storage_.set_http_transaction_factory(
+ make_scoped_ptr(new HttpCache(network_session.get(),
+ HttpCache::DefaultBackend::InMemory(0)))
+ .Pass());
+ scoped_ptr<URLRequestJobFactoryImpl> job_factory =
+ make_scoped_ptr(new URLRequestJobFactoryImpl());
#if !defined(DISABLE_FILE_SUPPORT)
job_factory->SetProtocolHandler("file",
make_scoped_ptr(new FileProtocolHandler(
base::ThreadTaskRunnerHandle::Get())));
#endif
- storage_.set_job_factory(job_factory);
+ storage_.set_job_factory(job_factory.Pass());
}
~RequestContext() override { AssertNoURLRequests(); }
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698