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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « net/tools/crash_cache/crash_cache.cc ('k') | net/tools/net_watcher/net_watcher.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) 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( 152 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory(
153 net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); 153 net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
154 net::HttpServerPropertiesImpl http_server_properties; 154 net::HttpServerPropertiesImpl http_server_properties;
155 155
156 net::HttpNetworkSession::Params session_params; 156 net::HttpNetworkSession::Params session_params;
157 session_params.host_resolver = host_resolver.get(); 157 session_params.host_resolver = host_resolver.get();
158 session_params.cert_verifier = cert_verifier.get(); 158 session_params.cert_verifier = cert_verifier.get();
159 session_params.proxy_service = proxy_service.get(); 159 session_params.proxy_service = proxy_service.get();
160 session_params.http_auth_handler_factory = http_auth_handler_factory.get(); 160 session_params.http_auth_handler_factory = http_auth_handler_factory.get();
161 session_params.http_server_properties = &http_server_properties; 161 session_params.http_server_properties = &http_server_properties;
162 session_params.ssl_config_service = ssl_config_service; 162 session_params.ssl_config_service = ssl_config_service.get();
163 163
164 scoped_refptr<net::HttpNetworkSession> network_session( 164 scoped_refptr<net::HttpNetworkSession> network_session(
165 new net::HttpNetworkSession(session_params)); 165 new net::HttpNetworkSession(session_params));
166 if (use_cache) { 166 if (use_cache) {
167 factory = new net::HttpCache(network_session, 167 factory = new net::HttpCache(network_session.get(),
168 net::HttpCache::DefaultBackend::InMemory(0)); 168 net::HttpCache::DefaultBackend::InMemory(0));
169 } else { 169 } else {
170 factory = new net::HttpNetworkLayer(network_session); 170 factory = new net::HttpNetworkLayer(network_session.get());
171 } 171 }
172 172
173 { 173 {
174 base::StatsCounterTimer driver_time("FetchClient.total_time"); 174 base::StatsCounterTimer driver_time("FetchClient.total_time");
175 base::StatsScope<base::StatsCounterTimer> scope(driver_time); 175 base::StatsScope<base::StatsCounterTimer> scope(driver_time);
176 176
177 Client** clients = new Client*[client_limit]; 177 Client** clients = new Client*[client_limit];
178 for (int i = 0; i < client_limit; i++) 178 for (int i = 0; i < client_limit; i++)
179 clients[i] = new Client(factory, url); 179 clients[i] = new Client(factory, url);
180 180
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 std::string name(table.GetRowName(index)); 213 std::string name(table.GetRowName(index));
214 if (name.length() > 0) { 214 if (name.length() > 0) {
215 int value = table.GetRowValue(index); 215 int value = table.GetRowValue(index);
216 printf("%s:\t%d\n", name.c_str(), value); 216 printf("%s:\t%d\n", name.c_str(), value);
217 } 217 }
218 } 218 }
219 printf("</stats>\n"); 219 printf("</stats>\n");
220 } 220 }
221 return 0; 221 return 0;
222 } 222 }
OLDNEW
« no previous file with comments | « net/tools/crash_cache/crash_cache.cc ('k') | net/tools/net_watcher/net_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698