summaryrefslogtreecommitdiffstats
path: root/net/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy')
-rw-r--r--net/proxy/proxy_resolver_perftest.cc4
-rw-r--r--net/proxy/proxy_resolver_v8.cc2
-rw-r--r--net/proxy/proxy_resolver_v8_unittest.cc6
-rw-r--r--net/proxy/proxy_script_fetcher_unittest.cc1
4 files changed, 4 insertions, 9 deletions
diff --git a/net/proxy/proxy_resolver_perftest.cc b/net/proxy/proxy_resolver_perftest.cc
index 85ad554..22f2350 100644
--- a/net/proxy/proxy_resolver_perftest.cc
+++ b/net/proxy/proxy_resolver_perftest.cc
@@ -185,10 +185,8 @@ TEST(ProxyResolverPerfTest, ProxyResolverMac) {
#endif
TEST(ProxyResolverPerfTest, ProxyResolverV8) {
- net::HostResolver host_resolver;
-
net::ProxyResolverV8::JSBindings* js_bindings =
- net::ProxyResolverV8::CreateDefaultBindings(&host_resolver, NULL);
+ net::ProxyResolverV8::CreateDefaultBindings(new net::HostResolver, NULL);
net::ProxyResolverV8 resolver(js_bindings);
PacPerfSuiteRunner runner(&resolver, "ProxyResolverV8");
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index ad4f1eb6..6bbffec 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -103,7 +103,7 @@ class SyncHostResolverBridge
event_.Signal();
}
- HostResolver* host_resolver_;
+ scoped_refptr<HostResolver> host_resolver_;
MessageLoop* host_resolver_loop_;
// Event to notify completion of resolve request.
diff --git a/net/proxy/proxy_resolver_v8_unittest.cc b/net/proxy/proxy_resolver_v8_unittest.cc
index 0e8ba47..7fab7d7 100644
--- a/net/proxy/proxy_resolver_v8_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_unittest.cc
@@ -378,9 +378,8 @@ TEST(ProxyResolverV8Test, V8Bindings) {
TEST(ProxyResolverV8DefaultBindingsTest, DnsResolve) {
// Get a hold of a DefaultJSBindings* (it is a hidden impl class).
- net::HostResolver host_resolver;
scoped_ptr<net::ProxyResolverV8::JSBindings> bindings(
- net::ProxyResolverV8::CreateDefaultBindings(&host_resolver, NULL));
+ net::ProxyResolverV8::CreateDefaultBindings(new net::HostResolver, NULL));
// Considered an error.
EXPECT_EQ("", bindings->DnsResolve(""));
@@ -430,9 +429,8 @@ TEST(ProxyResolverV8DefaultBindingsTest, DnsResolve) {
TEST(ProxyResolverV8DefaultBindingsTest, MyIpAddress) {
// Get a hold of a DefaultJSBindings* (it is a hidden impl class).
- net::HostResolver host_resolver;
scoped_ptr<net::ProxyResolverV8::JSBindings> bindings(
- net::ProxyResolverV8::CreateDefaultBindings(&host_resolver, NULL));
+ net::ProxyResolverV8::CreateDefaultBindings(new net::HostResolver, NULL));
// Our ip address is always going to be 127.0.0.1, since we are using a
// mock host mapper when running in unit-test mode.
diff --git a/net/proxy/proxy_script_fetcher_unittest.cc b/net/proxy/proxy_script_fetcher_unittest.cc
index 5b16738b..8a7cfb5 100644
--- a/net/proxy/proxy_script_fetcher_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_unittest.cc
@@ -41,7 +41,6 @@ class RequestContext : public URLRequestContext {
~RequestContext() {
delete http_transaction_factory_;
delete proxy_service_;
- delete host_resolver_;
}
};