Chromium Code Reviews

Unified Diff: net/proxy/proxy_script_fetcher_unittest.cc

Issue 118100: Avoid doing concurrent DNS resolves of the same hostname (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Get compiling on mac Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: net/proxy/proxy_script_fetcher_unittest.cc
===================================================================
--- net/proxy/proxy_script_fetcher_unittest.cc (revision 18213)
+++ net/proxy/proxy_script_fetcher_unittest.cc (working copy)
@@ -30,15 +30,18 @@
public:
RequestContext() {
net::ProxyConfig no_proxy;
+ host_resolver_ = new net::HostResolver;
proxy_service_ = net::ProxyService::CreateFixed(no_proxy);
http_transaction_factory_ =
- new net::HttpCache(net::HttpNetworkLayer::CreateFactory(proxy_service_),
- disk_cache::CreateInMemoryCacheBackend(0));
+ new net::HttpCache(net::HttpNetworkLayer::CreateFactory(
+ host_resolver_, proxy_service_),
+ disk_cache::CreateInMemoryCacheBackend(0));
}
~RequestContext() {
delete http_transaction_factory_;
delete proxy_service_;
+ delete host_resolver_;
}
};

Powered by Google App Engine