Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: webkit/tools/test_shell/test_shell_request_context.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. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/base/address_list.h ('K') | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_request_context.cc
===================================================================
--- webkit/tools/test_shell/test_shell_request_context.cc (revision 18213)
+++ webkit/tools/test_shell/test_shell_request_context.cc (working copy)
@@ -5,6 +5,7 @@
#include "webkit/tools/test_shell/test_shell_request_context.h"
#include "net/base/cookie_monster.h"
+#include "net/base/host_resolver.h"
#include "net/proxy/proxy_service.h"
#include "webkit/glue/webkit_glue.h"
@@ -41,14 +42,15 @@
// issues.
no_proxy = true;
#endif
+ host_resolver_ = new net::HostResolver();
proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_config : NULL,
false, NULL, NULL);
net::HttpCache *cache;
if (cache_path.empty()) {
- cache = new net::HttpCache(proxy_service_, 0);
+ cache = new net::HttpCache(host_resolver_, proxy_service_, 0);
} else {
- cache = new net::HttpCache(proxy_service_, cache_path, 0);
+ cache = new net::HttpCache(host_resolver_, proxy_service_, cache_path, 0);
}
cache->set_mode(cache_mode);
http_transaction_factory_ = cache;
@@ -58,6 +60,7 @@
delete cookie_store_;
delete http_transaction_factory_;
delete proxy_service_;
+ delete host_resolver_;
}
const std::string& TestShellRequestContext::GetUserAgent(
« net/base/address_list.h ('K') | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698