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

Unified Diff: net/socket/client_socket_pool_base.cc

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/client_socket_handle.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.cc
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 75abae6d9e7e467f0eb6519a8eee3d3d3aae9697..222872911dd65f04ee29f9de78817ce64ac9147a 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -87,9 +87,9 @@ void ConnectJob::UseForNormalRequest() {
void ConnectJob::set_socket(ClientSocket* socket) {
if (socket) {
- net_log().AddEvent(NetLog::TYPE_CONNECT_JOB_SET_SOCKET,
- new NetLogSourceParameter("source_dependency",
- socket->NetLog().source()));
+ net_log().AddEvent(NetLog::TYPE_CONNECT_JOB_SET_SOCKET, make_scoped_refptr(
+ new NetLogSourceParameter("source_dependency",
+ socket->NetLog().source())));
}
socket_.reset(socket);
}
@@ -110,7 +110,7 @@ void ConnectJob::ResetTimer(base::TimeDelta remaining_time) {
void ConnectJob::LogConnectStart() {
net_log().BeginEvent(NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_CONNECT,
- new NetLogStringParameter("group_name", group_name_));
+ make_scoped_refptr(new NetLogStringParameter("group_name", group_name_)));
}
void ConnectJob::LogConnectCompletion(int net_error) {
@@ -239,7 +239,8 @@ void ClientSocketPoolBaseHelper::RequestSockets(
request.net_log().BeginEvent(
NetLog::TYPE_SOCKET_POOL_CONNECTING_N_SOCKETS,
- new NetLogIntegerParameter("num_sockets", num_sockets));
+ make_scoped_refptr(new NetLogIntegerParameter(
+ "num_sockets", num_sockets)));
Group* group = GetOrCreateGroup(group_name);
@@ -394,7 +395,8 @@ void ClientSocketPoolBaseHelper::LogBoundConnectJobToRequest(
const NetLog::Source& connect_job_source, const Request* request) {
request->net_log().AddEvent(
NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB,
- new NetLogSourceParameter("source_dependency", connect_job_source));
+ make_scoped_refptr(new NetLogSourceParameter(
+ "source_dependency", connect_job_source)));
}
void ClientSocketPoolBaseHelper::CancelRequest(
@@ -763,8 +765,8 @@ void ClientSocketPoolBaseHelper::OnConnectJobComplete(
HandOutSocket(socket.release(), false /* unused socket */, r->handle(),
base::TimeDelta(), group, r->net_log());
}
- r->net_log().EndEvent(NetLog::TYPE_SOCKET_POOL,
- new NetLogIntegerParameter("net_error", result));
+ r->net_log().EndEvent(NetLog::TYPE_SOCKET_POOL, make_scoped_refptr(
+ new NetLogIntegerParameter("net_error", result)));
InvokeUserCallbackLater(r->handle(), r->callback(), result);
} else {
RemoveConnectJob(job, group);
@@ -849,13 +851,13 @@ void ClientSocketPoolBaseHelper::HandOutSocket(
if (reused) {
net_log.AddEvent(
NetLog::TYPE_SOCKET_POOL_REUSED_AN_EXISTING_SOCKET,
- new NetLogIntegerParameter(
- "idle_ms", static_cast<int>(idle_time.InMilliseconds())));
+ make_scoped_refptr(new NetLogIntegerParameter(
+ "idle_ms", static_cast<int>(idle_time.InMilliseconds()))));
}
net_log.AddEvent(NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET,
- new NetLogSourceParameter(
- "source_dependency", socket->NetLog().source()));
+ make_scoped_refptr(new NetLogSourceParameter(
+ "source_dependency", socket->NetLog().source())));
handed_out_socket_count_++;
group->IncrementActiveSocketCount();
« no previous file with comments | « net/socket/client_socket_handle.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698