Skip to content
Snippets Groups Projects
Commit 52617df3 authored by willchan@chromium.org's avatar willchan@chromium.org
Browse files

Don't leak proxy script fetcher's http transaction factories.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6012008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70140 0039d316-1c4b-4281-b951-d872f2087c98
parent a95986a8
No related merge requests found
......@@ -189,19 +189,7 @@ ConstructProxyScriptFetcherContext(IOThread::Globals* globals,
globals->http_auth_handler_factory.get());
context->set_proxy_service(globals->proxy_script_fetcher_proxy_service.get());
context->set_http_transaction_factory(
new net::HttpNetworkLayer(
globals->client_socket_factory,
globals->host_resolver.get(),
globals->cert_verifier.get(),
globals->dnsrr_resolver.get(),
NULL /* dns_cert_checker */,
NULL /* ssl_host_info_factory */,
globals->proxy_script_fetcher_proxy_service.get(),
globals->ssl_config_service.get(),
new net::SpdySessionPool(globals->ssl_config_service.get()),
globals->http_auth_handler_factory.get(),
&globals->network_delegate,
net_log));
globals->proxy_script_fetcher_http_transaction_factory.get());
// In-memory cookie store.
context->set_cookie_store(new net::CookieMonster(NULL, NULL));
return context;
......@@ -345,6 +333,20 @@ void IOThread::Init() {
// For the ProxyScriptFetcher, we use a direct ProxyService.
globals_->proxy_script_fetcher_proxy_service =
net::ProxyService::CreateDirectWithNetLog(net_log_);
globals_->proxy_script_fetcher_http_transaction_factory.reset(
new net::HttpNetworkLayer(
globals_->client_socket_factory,
globals_->host_resolver.get(),
globals_->cert_verifier.get(),
globals_->dnsrr_resolver.get(),
NULL /* dns_cert_checker */,
NULL /* ssl_host_info_factory */,
globals_->proxy_script_fetcher_proxy_service.get(),
globals_->ssl_config_service.get(),
new net::SpdySessionPool(globals_->ssl_config_service.get()),
globals_->http_auth_handler_factory.get(),
&globals_->network_delegate,
net_log_));
scoped_refptr<URLRequestContext> proxy_script_fetcher_context =
ConstructProxyScriptFetcherContext(globals_, net_log_);
......
......@@ -34,6 +34,7 @@ class ClientSocketFactory;
class DnsRRResolver;
class HostResolver;
class HttpAuthHandlerFactory;
class HttpTransactionFactory;
class ProxyScriptFetcher;
class ProxyService;
class SSLConfigService;
......@@ -53,6 +54,8 @@ class IOThread : public BrowserProcessSubThread {
scoped_refptr<net::SSLConfigService> ssl_config_service;
scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory;
scoped_refptr<net::ProxyService> proxy_script_fetcher_proxy_service;
scoped_ptr<net::HttpTransactionFactory>
proxy_script_fetcher_http_transaction_factory;
scoped_ptr<net::URLSecurityManager> url_security_manager;
ChromeNetworkDelegate network_delegate;
scoped_refptr<URLRequestContext> proxy_script_fetcher_context;
......
......@@ -117,7 +117,7 @@ class ConnectionTesterTest : public PlatformTest {
proxy_service_ = net::ProxyService::CreateDirect();
proxy_script_fetcher_context_->set_proxy_service(proxy_service_);
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
proxy_script_fetcher_context_->set_http_transaction_factory(
http_transaction_factory_.reset(
new net::HttpNetworkLayer(
client_socket_factory_,
&host_resolver_,
......@@ -131,6 +131,8 @@ class ConnectionTesterTest : public PlatformTest {
&http_auth_handler_factory_,
NULL /* NetworkDelegate */,
NULL /* NetLog */));
proxy_script_fetcher_context_->set_http_transaction_factory(
http_transaction_factory_.get());
// In-memory cookie store.
proxy_script_fetcher_context_->set_cookie_store(
new net::CookieMonster(NULL, NULL));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment