diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 10:38:24 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 10:38:24 +0000 |
commit | b64e7ba703e1003ca773ad3999f53e994ef7ea06 (patch) | |
tree | 4d1586860bc3d00d4d9de8afd868638728953245 | |
parent | 80a8f2e2bef808bfe12217b2088a13a7b5b2c206 (diff) | |
download | chromium_src-b64e7ba703e1003ca773ad3999f53e994ef7ea06.zip chromium_src-b64e7ba703e1003ca773ad3999f53e994ef7ea06.tar.gz chromium_src-b64e7ba703e1003ca773ad3999f53e994ef7ea06.tar.bz2 |
Fix ProxyService usage in Java plugin proxy interface
ProxyServie now holds ownership of the ProxyResolver instance passed in.
MozillaExtensionApi class passed in a stack instance of ProxyResolver
causing problems in delete.
Review URL: http://codereview.chromium.org/13702
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6703 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/mozilla_extensions.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/webkit/glue/plugins/mozilla_extensions.cc b/webkit/glue/plugins/mozilla_extensions.cc index e177428..5c0f47f 100644 --- a/webkit/glue/plugins/mozilla_extensions.cc +++ b/webkit/glue/plugins/mozilla_extensions.cc @@ -42,11 +42,14 @@ bool MozillaExtensionApi::FindProxyForUrl(const char* url, return result; } - net::ProxyResolverWinHttp proxy_resolver; - net::ProxyService proxy_service(&proxy_resolver); - net::ProxyInfo proxy_info; + scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::Create(NULL)); + if (!proxy_service.get()) { + NOTREACHED(); + return result; + } - if (proxy_service.ResolveProxy(GURL(std::string(url)), + net::ProxyInfo proxy_info; + if (proxy_service->ResolveProxy(GURL(std::string(url)), &proxy_info, NULL, NULL) == net::OK) { |