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

Side by Side Diff: net/tools/fetch/fetch_client.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/tcp_pinger_unittest.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 usage(argv[0]); 126 usage(argv[0]);
127 int client_limit = 1; 127 int client_limit = 1;
128 if (parsed_command_line.HasSwitch("n")) 128 if (parsed_command_line.HasSwitch("n"))
129 StringToInt(parsed_command_line.GetSwitchValueASCII("n"), &client_limit); 129 StringToInt(parsed_command_line.GetSwitchValueASCII("n"), &client_limit);
130 bool use_cache = parsed_command_line.HasSwitch("use-cache"); 130 bool use_cache = parsed_command_line.HasSwitch("use-cache");
131 131
132 // Do work here. 132 // Do work here.
133 MessageLoop loop(MessageLoop::TYPE_IO); 133 MessageLoop loop(MessageLoop::TYPE_IO);
134 134
135 scoped_refptr<net::HostResolver> host_resolver( 135 scoped_refptr<net::HostResolver> host_resolver(
136 net::CreateSystemHostResolver()); 136 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism));
137 137
138 scoped_refptr<net::ProxyService> proxy_service( 138 scoped_refptr<net::ProxyService> proxy_service(
139 net::ProxyService::CreateNull()); 139 net::ProxyService::CreateNull());
140 scoped_refptr<net::SSLConfigService> ssl_config_service( 140 scoped_refptr<net::SSLConfigService> ssl_config_service(
141 net::SSLConfigService::CreateSystemSSLConfigService()); 141 net::SSLConfigService::CreateSystemSSLConfigService());
142 net::HttpTransactionFactory* factory = NULL; 142 net::HttpTransactionFactory* factory = NULL;
143 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( 143 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory(
144 net::HttpAuthHandlerFactory::CreateDefault()); 144 net::HttpAuthHandlerFactory::CreateDefault());
145 if (use_cache) { 145 if (use_cache) {
146 factory = new net::HttpCache(host_resolver, proxy_service, 146 factory = new net::HttpCache(host_resolver, proxy_service,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 std::string name(table.GetRowName(index)); 196 std::string name(table.GetRowName(index));
197 if (name.length() > 0) { 197 if (name.length() > 0) {
198 int value = table.GetRowValue(index); 198 int value = table.GetRowValue(index);
199 printf("%s:\t%d\n", name.c_str(), value); 199 printf("%s:\t%d\n", name.c_str(), value);
200 } 200 }
201 } 201 }
202 printf("</stats>\n"); 202 printf("</stats>\n");
203 } 203 }
204 return 0; 204 return 0;
205 } 205 }
OLDNEW
« no previous file with comments | « net/socket/tcp_pinger_unittest.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698