OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |