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

Side by Side Diff: net/socket/client_socket_handle.cc

Issue 2623383005: Log states of JobController in Net MemoryDumpProvider (Closed)
Patch Set: self review Created 3 years, 11 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
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | no next file » | 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 "net/socket/client_socket_handle.h" 5 #include "net/socket/client_socket_handle.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // No times if the socket is reused. 128 // No times if the socket is reused.
129 if (is_reused) 129 if (is_reused)
130 return true; 130 return true;
131 131
132 load_timing_info->connect_timing = connect_timing_; 132 load_timing_info->connect_timing = connect_timing_;
133 return true; 133 return true;
134 } 134 }
135 135
136 void ClientSocketHandle::DumpMemoryStats( 136 void ClientSocketHandle::DumpMemoryStats(
137 StreamSocket::SocketMemoryStats* stats) const { 137 StreamSocket::SocketMemoryStats* stats) const {
138 if (!socket_)
139 return;
138 socket_->DumpMemoryStats(stats); 140 socket_->DumpMemoryStats(stats);
139 } 141 }
140 142
141 void ClientSocketHandle::SetSocket(std::unique_ptr<StreamSocket> s) { 143 void ClientSocketHandle::SetSocket(std::unique_ptr<StreamSocket> s) {
142 socket_ = std::move(s); 144 socket_ = std::move(s);
143 } 145 }
144 146
145 void ClientSocketHandle::OnIOComplete(int result) { 147 void ClientSocketHandle::OnIOComplete(int result) {
146 TRACE_EVENT0(kNetTracingCategory, "ClientSocketHandle::OnIOComplete"); 148 TRACE_EVENT0(kNetTracingCategory, "ClientSocketHandle::OnIOComplete");
147 CompletionCallback callback = user_callback_; 149 CompletionCallback callback = user_callback_;
(...skipping 21 matching lines...) Expand all
169 // Broadcast that the socket has been acquired. 171 // Broadcast that the socket has been acquired.
170 // TODO(eroman): This logging is not complete, in particular set_socket() and 172 // TODO(eroman): This logging is not complete, in particular set_socket() and
171 // release() socket. It ends up working though, since those methods are being 173 // release() socket. It ends up working though, since those methods are being
172 // used to layer sockets (and the destination sources are the same). 174 // used to layer sockets (and the destination sources are the same).
173 DCHECK(socket_.get()); 175 DCHECK(socket_.get());
174 socket_->NetLog().BeginEvent(NetLogEventType::SOCKET_IN_USE, 176 socket_->NetLog().BeginEvent(NetLogEventType::SOCKET_IN_USE,
175 requesting_source_.ToEventParametersCallback()); 177 requesting_source_.ToEventParametersCallback());
176 } 178 }
177 179
178 } // namespace net 180 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698