| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 if (parsed_command_line.HasSwitch("n")) { | 134 if (parsed_command_line.HasSwitch("n")) { |
| 135 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"), | 135 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"), |
| 136 &client_limit); | 136 &client_limit); |
| 137 } | 137 } |
| 138 bool use_cache = parsed_command_line.HasSwitch("use-cache"); | 138 bool use_cache = parsed_command_line.HasSwitch("use-cache"); |
| 139 | 139 |
| 140 // Do work here. | 140 // Do work here. |
| 141 MessageLoop loop(MessageLoop::TYPE_IO); | 141 MessageLoop loop(MessageLoop::TYPE_IO); |
| 142 | 142 |
| 143 scoped_ptr<net::HostResolver> host_resolver( | 143 scoped_ptr<net::HostResolver> host_resolver( |
| 144 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, | 144 net::HostResolver::CreateDefaultResolver(NULL)); |
| 145 net::HostResolver::kDefaultRetryAttempts, | |
| 146 NULL)); | |
| 147 | |
| 148 scoped_ptr<net::CertVerifier> cert_verifier( | 145 scoped_ptr<net::CertVerifier> cert_verifier( |
| 149 net::CertVerifier::CreateDefault()); | 146 net::CertVerifier::CreateDefault()); |
| 150 scoped_ptr<net::ProxyService> proxy_service( | 147 scoped_ptr<net::ProxyService> proxy_service( |
| 151 net::ProxyService::CreateDirect()); | 148 net::ProxyService::CreateDirect()); |
| 152 scoped_refptr<net::SSLConfigService> ssl_config_service( | 149 scoped_refptr<net::SSLConfigService> ssl_config_service( |
| 153 new net::SSLConfigServiceDefaults); | 150 new net::SSLConfigServiceDefaults); |
| 154 net::HttpTransactionFactory* factory = NULL; | 151 net::HttpTransactionFactory* factory = NULL; |
| 155 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( | 152 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( |
| 156 net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); | 153 net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); |
| 157 net::HttpServerPropertiesImpl http_server_properties; | 154 net::HttpServerPropertiesImpl http_server_properties; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 std::string name(table.GetRowName(index)); | 213 std::string name(table.GetRowName(index)); |
| 217 if (name.length() > 0) { | 214 if (name.length() > 0) { |
| 218 int value = table.GetRowValue(index); | 215 int value = table.GetRowValue(index); |
| 219 printf("%s:\t%d\n", name.c_str(), value); | 216 printf("%s:\t%d\n", name.c_str(), value); |
| 220 } | 217 } |
| 221 } | 218 } |
| 222 printf("</stats>\n"); | 219 printf("</stats>\n"); |
| 223 } | 220 } |
| 224 return 0; | 221 return 0; |
| 225 } | 222 } |
| OLD | NEW |