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

Unified Diff: net/base/host_resolver.h

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 | « jingle/notifier/listener/mediator_thread_impl.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver.h
===================================================================
--- net/base/host_resolver.h (revision 52747)
+++ net/base/host_resolver.h (working copy)
@@ -131,6 +131,11 @@
// Opaque type used to cancel a request.
typedef void* RequestHandle;
+ // This value can be passed into CreateSystemHostResolver as the
+ // |max_concurrent_resolves| parameter. It will select a default level of
+ // concurrency.
+ static const size_t kDefaultParallelism = 0;
+
// Resolves the given hostname (or IP address literal), filling out the
// |addresses| object upon success. The |info.port| parameter will be set as
// the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if
@@ -238,7 +243,10 @@
// Creates a HostResolver implementation that queries the underlying system.
// (Except if a unit-test has changed the global HostResolverProc using
// ScopedHostResolverProc to intercept requests to the system).
-HostResolver* CreateSystemHostResolver();
+// |max_concurrent_resolves| is how many resolve requests will be allowed to
+// run in parallel. Pass HostResolver::kDefaultParallelism to choose a
+// default value.
+HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves);
} // namespace net
« no previous file with comments | « jingle/notifier/listener/mediator_thread_impl.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698