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

Unified Diff: net/base/host_resolver_impl.cc

Issue 3019007: Add a command line flag to change the default number of parallel DNS requests... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 10 years, 5 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
« no previous file with comments | « net/base/host_resolver.h ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
===================================================================
--- net/base/host_resolver_impl.cc (revision 52747)
+++ net/base/host_resolver_impl.cc (working copy)
@@ -52,13 +52,17 @@
} // anonymous namespace
-HostResolver* CreateSystemHostResolver() {
+HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves) {
// Maximum of 50 concurrent threads.
// TODO(eroman): Adjust this, do some A/B experiments.
- static const size_t kMaxJobs = 50u;
+ static const size_t kDefaultMaxJobs = 50u;
+ if (max_concurrent_resolves == HostResolver::kDefaultParallelism)
+ max_concurrent_resolves = kDefaultMaxJobs;
+
HostResolverImpl* resolver =
- new HostResolverImpl(NULL, CreateDefaultCache(), kMaxJobs);
+ new HostResolverImpl(NULL, CreateDefaultCache(),
+ max_concurrent_resolves);
return resolver;
}
« no previous file with comments | « net/base/host_resolver.h ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698