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

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

Issue 2565523002: Instrument SpdySessionPool using MemoryDumpProvider (Closed)
Patch Set: Address comments Created 4 years 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/socket/client_socket_handle.h ('k') | net/spdy/spdy_session.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) 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 load_timing_info->socket_reused = is_reused; 126 load_timing_info->socket_reused = is_reused;
127 127
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(
137 base::trace_event::ProcessMemoryDump* pmd,
138 const std::string& parent_absolute_name) const {
139 socket_->DumpMemoryStats(pmd, parent_absolute_name);
140 }
141
136 void ClientSocketHandle::SetSocket(std::unique_ptr<StreamSocket> s) { 142 void ClientSocketHandle::SetSocket(std::unique_ptr<StreamSocket> s) {
137 socket_ = std::move(s); 143 socket_ = std::move(s);
138 } 144 }
139 145
140 void ClientSocketHandle::OnIOComplete(int result) { 146 void ClientSocketHandle::OnIOComplete(int result) {
141 TRACE_EVENT0(kNetTracingCategory, "ClientSocketHandle::OnIOComplete"); 147 TRACE_EVENT0(kNetTracingCategory, "ClientSocketHandle::OnIOComplete");
142 CompletionCallback callback = user_callback_; 148 CompletionCallback callback = user_callback_;
143 user_callback_.Reset(); 149 user_callback_.Reset();
144 HandleInitCompletion(result); 150 HandleInitCompletion(result);
145 callback.Run(result); 151 callback.Run(result);
(...skipping 18 matching lines...) Expand all
164 // Broadcast that the socket has been acquired. 170 // Broadcast that the socket has been acquired.
165 // TODO(eroman): This logging is not complete, in particular set_socket() and 171 // TODO(eroman): This logging is not complete, in particular set_socket() and
166 // release() socket. It ends up working though, since those methods are being 172 // release() socket. It ends up working though, since those methods are being
167 // used to layer sockets (and the destination sources are the same). 173 // used to layer sockets (and the destination sources are the same).
168 DCHECK(socket_.get()); 174 DCHECK(socket_.get());
169 socket_->NetLog().BeginEvent(NetLogEventType::SOCKET_IN_USE, 175 socket_->NetLog().BeginEvent(NetLogEventType::SOCKET_IN_USE,
170 requesting_source_.ToEventParametersCallback()); 176 requesting_source_.ToEventParametersCallback());
171 } 177 }
172 178
173 } // namespace net 179 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698