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

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

Issue 2363003: Rework the logging for sockets/connectjobs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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/spdy/spdy_stream_unittest.cc ('k') | net/url_request/url_request_unittest.h » ('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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 net::ProxyService::CreateNull()); 139 net::ProxyService::CreateNull());
140 scoped_refptr<net::SSLConfigService> ssl_config_service( 140 scoped_refptr<net::SSLConfigService> ssl_config_service(
141 net::SSLConfigService::CreateSystemSSLConfigService()); 141 net::SSLConfigService::CreateSystemSSLConfigService());
142 net::HttpTransactionFactory* factory = NULL; 142 net::HttpTransactionFactory* factory = NULL;
143 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( 143 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory(
144 net::HttpAuthHandlerFactory::CreateDefault()); 144 net::HttpAuthHandlerFactory::CreateDefault());
145 if (use_cache) { 145 if (use_cache) {
146 factory = new net::HttpCache(NULL, host_resolver, proxy_service, 146 factory = new net::HttpCache(NULL, host_resolver, proxy_service,
147 ssl_config_service, 147 ssl_config_service,
148 http_auth_handler_factory.get(), 148 http_auth_handler_factory.get(),
149 NULL,
149 net::HttpCache::DefaultBackend::InMemory(0)); 150 net::HttpCache::DefaultBackend::InMemory(0));
150 } else { 151 } else {
151 factory = new net::HttpNetworkLayer( 152 factory = new net::HttpNetworkLayer(
152 net::ClientSocketFactory::GetDefaultFactory(), NULL, host_resolver, 153 net::ClientSocketFactory::GetDefaultFactory(), NULL, host_resolver,
153 proxy_service, ssl_config_service, http_auth_handler_factory.get()); 154 proxy_service, ssl_config_service, http_auth_handler_factory.get(),
155 NULL);
154 } 156 }
155 157
156 { 158 {
157 StatsCounterTimer driver_time("FetchClient.total_time"); 159 StatsCounterTimer driver_time("FetchClient.total_time");
158 StatsScope<StatsCounterTimer> scope(driver_time); 160 StatsScope<StatsCounterTimer> scope(driver_time);
159 161
160 Client** clients = new Client*[client_limit]; 162 Client** clients = new Client*[client_limit];
161 for (int i = 0; i < client_limit; i++) 163 for (int i = 0; i < client_limit; i++)
162 clients[i] = new Client(factory, url); 164 clients[i] = new Client(factory, url);
163 165
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 std::string name(table.GetRowName(index)); 198 std::string name(table.GetRowName(index));
197 if (name.length() > 0) { 199 if (name.length() > 0) {
198 int value = table.GetRowValue(index); 200 int value = table.GetRowValue(index);
199 printf("%s:\t%d\n", name.c_str(), value); 201 printf("%s:\t%d\n", name.c_str(), value);
200 } 202 }
201 } 203 }
202 printf("</stats>\n"); 204 printf("</stats>\n");
203 } 205 }
204 return 0; 206 return 0;
205 } 207 }
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698