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

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

Issue 7011044: Add a command line option to turn off retry attempts to resolve host (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/url_request/url_request_test_util.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"), 132 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"),
133 &client_limit); 133 &client_limit);
134 } 134 }
135 bool use_cache = parsed_command_line.HasSwitch("use-cache"); 135 bool use_cache = parsed_command_line.HasSwitch("use-cache");
136 136
137 // Do work here. 137 // Do work here.
138 MessageLoop loop(MessageLoop::TYPE_IO); 138 MessageLoop loop(MessageLoop::TYPE_IO);
139 139
140 scoped_ptr<net::HostResolver> host_resolver( 140 scoped_ptr<net::HostResolver> host_resolver(
141 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 141 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
142 net::HostResolver::kDefaultRetryAttempts,
142 NULL)); 143 NULL));
143 144
144 scoped_ptr<net::CertVerifier> cert_verifier(new net::CertVerifier); 145 scoped_ptr<net::CertVerifier> cert_verifier(new net::CertVerifier);
145 scoped_ptr<net::ProxyService> proxy_service( 146 scoped_ptr<net::ProxyService> proxy_service(
146 net::ProxyService::CreateDirect()); 147 net::ProxyService::CreateDirect());
147 scoped_refptr<net::SSLConfigService> ssl_config_service( 148 scoped_refptr<net::SSLConfigService> ssl_config_service(
148 new net::SSLConfigServiceDefaults); 149 new net::SSLConfigServiceDefaults);
149 net::HttpTransactionFactory* factory = NULL; 150 net::HttpTransactionFactory* factory = NULL;
150 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( 151 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory(
151 net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); 152 net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 std::string name(table.GetRowName(index)); 210 std::string name(table.GetRowName(index));
210 if (name.length() > 0) { 211 if (name.length() > 0) {
211 int value = table.GetRowValue(index); 212 int value = table.GetRowValue(index);
212 printf("%s:\t%d\n", name.c_str(), value); 213 printf("%s:\t%d\n", name.c_str(), value);
213 } 214 }
214 } 215 }
215 printf("</stats>\n"); 216 printf("</stats>\n");
216 } 217 }
217 return 0; 218 return 0;
218 } 219 }
OLDNEW
« no previous file with comments | « net/test/test_server.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698