| 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 (!url.length()) | 134 if (!url.length()) |
| 135 usage(argv[0]); | 135 usage(argv[0]); |
| 136 int client_limit = 1; | 136 int client_limit = 1; |
| 137 if (parsed_command_line.HasSwitch("n")) { | 137 if (parsed_command_line.HasSwitch("n")) { |
| 138 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"), | 138 base::StringToInt(parsed_command_line.GetSwitchValueASCII("n"), |
| 139 &client_limit); | 139 &client_limit); |
| 140 } | 140 } |
| 141 bool use_cache = parsed_command_line.HasSwitch("use-cache"); | 141 bool use_cache = parsed_command_line.HasSwitch("use-cache"); |
| 142 | 142 |
| 143 // Do work here. | 143 // Do work here. |
| 144 base::MessageLoop loop(base::MessageLoop::TYPE_IO); | 144 base::MessageLoopForIO loop; |
| 145 | 145 |
| 146 net::HttpStreamFactory::EnableNpnHttp2Draft04(); | 146 net::HttpStreamFactory::EnableNpnHttp2Draft04(); |
| 147 | 147 |
| 148 scoped_ptr<net::HostResolver> host_resolver( | 148 scoped_ptr<net::HostResolver> host_resolver( |
| 149 net::HostResolver::CreateDefaultResolver(NULL)); | 149 net::HostResolver::CreateDefaultResolver(NULL)); |
| 150 scoped_ptr<net::CertVerifier> cert_verifier( | 150 scoped_ptr<net::CertVerifier> cert_verifier( |
| 151 net::CertVerifier::CreateDefault()); | 151 net::CertVerifier::CreateDefault()); |
| 152 scoped_ptr<net::TransportSecurityState> transport_security_state( | 152 scoped_ptr<net::TransportSecurityState> transport_security_state( |
| 153 new net::TransportSecurityState); | 153 new net::TransportSecurityState); |
| 154 scoped_ptr<net::ProxyService> proxy_service( | 154 scoped_ptr<net::ProxyService> proxy_service( |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 std::string name(table.GetRowName(index)); | 221 std::string name(table.GetRowName(index)); |
| 222 if (name.length() > 0) { | 222 if (name.length() > 0) { |
| 223 int value = table.GetRowValue(index); | 223 int value = table.GetRowValue(index); |
| 224 printf("%s:\t%d\n", name.c_str(), value); | 224 printf("%s:\t%d\n", name.c_str(), value); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 printf("</stats>\n"); | 227 printf("</stats>\n"); |
| 228 } | 228 } |
| 229 return 0; | 229 return 0; |
| 230 } | 230 } |
| OLD | NEW |