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

Unified Diff: net/http/http_cache.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/http/http_cache.cc
===================================================================
--- net/http/http_cache.cc (revision 18213)
+++ net/http/http_cache.cc (working copy)
@@ -960,13 +960,15 @@
//-----------------------------------------------------------------------------
-HttpCache::HttpCache(ProxyService* proxy_service,
+HttpCache::HttpCache(HostResolver* host_resolver,
+ ProxyService* proxy_service,
const std::wstring& cache_dir,
int cache_size)
: disk_cache_dir_(cache_dir),
mode_(NORMAL),
type_(DISK_CACHE),
- network_layer_(HttpNetworkLayer::CreateFactory(proxy_service)),
+ network_layer_(HttpNetworkLayer::CreateFactory(
+ host_resolver, proxy_service)),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)),
in_memory_cache_(false),
cache_size_(cache_size) {
@@ -984,10 +986,13 @@
cache_size_(cache_size) {
}
-HttpCache::HttpCache(ProxyService* proxy_service, int cache_size)
+HttpCache::HttpCache(HostResolver* host_resolver,
+ ProxyService* proxy_service,
+ int cache_size)
: mode_(NORMAL),
type_(MEMORY_CACHE),
- network_layer_(HttpNetworkLayer::CreateFactory(proxy_service)),
+ network_layer_(HttpNetworkLayer::CreateFactory(
+ host_resolver, proxy_service)),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)),
in_memory_cache_(true),
cache_size_(cache_size) {

Powered by Google App Engine
This is Rietveld 408576698