| Index: chrome/browser/io_thread.cc
|
| ===================================================================
|
| --- chrome/browser/io_thread.cc (revision 52747)
|
| +++ chrome/browser/io_thread.cc (working copy)
|
| @@ -27,8 +27,26 @@
|
|
|
| net::HostResolver* CreateGlobalHostResolver() {
|
| const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| - net::HostResolver* global_host_resolver = net::CreateSystemHostResolver();
|
|
|
| + size_t parallelism = net::HostResolver::kDefaultParallelism;
|
| +
|
| + // Use the concurrency override from the command-line, if any.
|
| + if (command_line.HasSwitch(switches::kHostResolverParallelism)) {
|
| + std::string s =
|
| + command_line.GetSwitchValueASCII(switches::kHostResolverParallelism);
|
| +
|
| + // Parse the switch (it should be a positive integer formatted as decimal).
|
| + int n;
|
| + if (StringToInt(s, &n) && n > 0) {
|
| + parallelism = static_cast<size_t>(n);
|
| + } else {
|
| + LOG(ERROR) << "Invalid switch for host resolver parallelism: " << s;
|
| + }
|
| + }
|
| +
|
| + net::HostResolver* global_host_resolver =
|
| + net::CreateSystemHostResolver(parallelism);
|
| +
|
| // Determine if we should disable IPv6 support.
|
| if (!command_line.HasSwitch(switches::kEnableIPv6)) {
|
| if (command_line.HasSwitch(switches::kDisableIPv6)) {
|
|
|