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

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: Lots of fixes driven by try jobs. Created 5 years, 4 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/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 dd49b56c68aa13c02bd41b6d9392ee109be1f2cf..f886dffc9aad0aff6de19d3dbc2550da50678eb7 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(scoped_ptr<CertVerifier>(new MockCertVerifier));
+ 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,14 +78,16 @@ 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(
+ scoped_ptr<HttpTransactionFactory>(new HttpCache(
+ network_session.get(), HttpCache::DefaultBackend::InMemory(0))));
+ scoped_ptr<URLRequestJobFactoryImpl> job_factory =
+ make_scoped_ptr(new URLRequestJobFactoryImpl());
#if !defined(DISABLE_FILE_SUPPORT)
job_factory->SetProtocolHandler(
"file", new FileProtocolHandler(base::ThreadTaskRunnerHandle::Get()));
#endif
- storage_.set_job_factory(job_factory);
+ storage_.set_job_factory(job_factory.Pass());
}
~RequestContext() override { AssertNoURLRequests(); }

Powered by Google App Engine
This is Rietveld 408576698