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

Unified Diff: net/tools/fetch/fetch_client.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
Index: net/tools/fetch/fetch_client.cc
===================================================================
--- net/tools/fetch/fetch_client.cc (revision 18213)
+++ net/tools/fetch/fetch_client.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/stats_counters.h"
#include "base/string_util.h"
#include "net/base/completion_callback.h"
+#include "net/base/host_resolver.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_cache.h"
@@ -125,12 +126,13 @@
// Do work here.
MessageLoop loop;
+ net::HostResolver host_resolver;
scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull());
net::HttpTransactionFactory* factory = NULL;
if (use_cache)
- factory = new net::HttpCache(proxy_service.get(), 0);
+ factory = new net::HttpCache(&host_resolver, proxy_service.get(), 0);
else
- factory = new net::HttpNetworkLayer(proxy_service.get());
+ factory = new net::HttpNetworkLayer(&host_resolver, proxy_service.get());
{
StatsCounterTimer driver_time("FetchClient.total_time");

Powered by Google App Engine
This is Rietveld 408576698