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

Side by Side Diff: net/tools/fetch/fetch_client.cc

Issue 3119027: Adds HostResolveImpl Requests and Jobs to log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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/test/test_server.cc ('k') | net/tools/hresolv/hresolv.cc » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (parsed_command_line.HasSwitch("n")) { 129 if (parsed_command_line.HasSwitch("n")) {
130 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"), 130 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"),
131 &client_limit); 131 &client_limit);
132 } 132 }
133 bool use_cache = parsed_command_line.HasSwitch("use-cache"); 133 bool use_cache = parsed_command_line.HasSwitch("use-cache");
134 134
135 // Do work here. 135 // Do work here.
136 MessageLoop loop(MessageLoop::TYPE_IO); 136 MessageLoop loop(MessageLoop::TYPE_IO);
137 137
138 scoped_refptr<net::HostResolver> host_resolver( 138 scoped_refptr<net::HostResolver> host_resolver(
139 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism)); 139 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
140 NULL));
140 141
141 scoped_refptr<net::ProxyService> proxy_service( 142 scoped_refptr<net::ProxyService> proxy_service(
142 net::ProxyService::CreateNull()); 143 net::ProxyService::CreateNull());
143 scoped_refptr<net::SSLConfigService> ssl_config_service( 144 scoped_refptr<net::SSLConfigService> ssl_config_service(
144 net::SSLConfigService::CreateSystemSSLConfigService()); 145 net::SSLConfigService::CreateSystemSSLConfigService());
145 net::HttpTransactionFactory* factory = NULL; 146 net::HttpTransactionFactory* factory = NULL;
146 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( 147 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory(
147 net::HttpAuthHandlerFactory::CreateDefault()); 148 net::HttpAuthHandlerFactory::CreateDefault());
148 if (use_cache) { 149 if (use_cache) {
149 factory = new net::HttpCache(host_resolver, proxy_service, 150 factory = new net::HttpCache(host_resolver, proxy_service,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 std::string name(table.GetRowName(index)); 200 std::string name(table.GetRowName(index));
200 if (name.length() > 0) { 201 if (name.length() > 0) {
201 int value = table.GetRowValue(index); 202 int value = table.GetRowValue(index);
202 printf("%s:\t%d\n", name.c_str(), value); 203 printf("%s:\t%d\n", name.c_str(), value);
203 } 204 }
204 } 205 }
205 printf("</stats>\n"); 206 printf("</stats>\n");
206 } 207 }
207 return 0; 208 return 0;
208 } 209 }
OLDNEW
« no previous file with comments | « net/test/test_server.cc ('k') | net/tools/hresolv/hresolv.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698