diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 03:58:09 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 03:58:09 +0000 |
commit | 80d6524d33061e0e4f7b06dd87ee94de3e05c7a8 (patch) | |
tree | 05719af6d66e6a107aeb056a020645ae0f483e82 /net/tools | |
parent | 22cdd93852c8f0782cb86b066cfcd95a9121912b (diff) | |
download | chromium_src-80d6524d33061e0e4f7b06dd87ee94de3e05c7a8.zip chromium_src-80d6524d33061e0e4f7b06dd87ee94de3e05c7a8.tar.gz chromium_src-80d6524d33061e0e4f7b06dd87ee94de3e05c7a8.tar.bz2 |
Reference count ProxyService.
This is necessary since ProxyService is getting shared between chrome's url request contexts (off the record, media), and the current way it is being shared could result in free memory read/writes during shutdown.
This is a step towards fixing http://crbug.com/15289.
BUG=http://crbug.com/15289
TEST=The existing tests should continue to pass following this refactor.
Review URL: http://codereview.chromium.org/165430
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r-- | net/tools/fetch/fetch_client.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc index 0f9f911..0031ff4 100644 --- a/net/tools/fetch/fetch_client.cc +++ b/net/tools/fetch/fetch_client.cc @@ -131,14 +131,14 @@ int main(int argc, char**argv) { scoped_refptr<net::HostResolver> host_resolver( net::CreateSystemHostResolver()); - scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); + scoped_refptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); net::HttpTransactionFactory* factory = NULL; if (use_cache) { - factory = new net::HttpCache(host_resolver, proxy_service.get(), 0); + factory = new net::HttpCache(host_resolver, proxy_service, 0); } else { factory = new net::HttpNetworkLayer( net::ClientSocketFactory::GetDefaultFactory(), host_resolver, - proxy_service.get()); + proxy_service); } { |