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

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

Issue 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)
Patch Set: rebased to 7f3d142161b15869f6bea58ac43c5f52ce5834ac 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/tcp_client_socket.h" 5 #include "net/socket/tcp_client_socket.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 void TCPClientSocket::AddConnectionAttempts( 330 void TCPClientSocket::AddConnectionAttempts(
331 const ConnectionAttempts& attempts) { 331 const ConnectionAttempts& attempts) {
332 connection_attempts_.insert(connection_attempts_.begin(), attempts.begin(), 332 connection_attempts_.insert(connection_attempts_.begin(), attempts.begin(),
333 attempts.end()); 333 attempts.end());
334 } 334 }
335 335
336 int64_t TCPClientSocket::GetTotalReceivedBytes() const { 336 int64_t TCPClientSocket::GetTotalReceivedBytes() const {
337 return total_received_bytes_; 337 return total_received_bytes_;
338 } 338 }
339 339
340 void TCPClientSocket::DumpMemoryStats(
341 base::trace_event::MemoryAllocatorDump* dump) const {}
eroman 2016/11/29 22:22:51 Presumably this remains to be implemented?
xunjieli 2016/11/30 16:02:03 Acknowledged. I've adopted the non-abstract approa
342
340 void TCPClientSocket::DidCompleteConnect(int result) { 343 void TCPClientSocket::DidCompleteConnect(int result) {
341 DCHECK_EQ(next_connect_state_, CONNECT_STATE_CONNECT_COMPLETE); 344 DCHECK_EQ(next_connect_state_, CONNECT_STATE_CONNECT_COMPLETE);
342 DCHECK_NE(result, ERR_IO_PENDING); 345 DCHECK_NE(result, ERR_IO_PENDING);
343 DCHECK(!connect_callback_.is_null()); 346 DCHECK(!connect_callback_.is_null());
344 347
345 result = DoConnectLoop(result); 348 result = DoConnectLoop(result);
346 if (result != ERR_IO_PENDING) { 349 if (result != ERR_IO_PENDING) {
347 socket_->EndLoggingMultipleConnectAttempts(result); 350 socket_->EndLoggingMultipleConnectAttempts(result);
348 base::ResetAndReturn(&connect_callback_).Run(result); 351 base::ResetAndReturn(&connect_callback_).Run(result);
349 } 352 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 void TCPClientSocket::EmitTCPMetricsHistogramsOnDisconnect() { 392 void TCPClientSocket::EmitTCPMetricsHistogramsOnDisconnect() {
390 base::TimeDelta rtt; 393 base::TimeDelta rtt;
391 if (socket_->GetEstimatedRoundTripTime(&rtt)) { 394 if (socket_->GetEstimatedRoundTripTime(&rtt)) {
392 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TcpRtt.AtDisconnect", rtt, 395 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TcpRtt.AtDisconnect", rtt,
393 base::TimeDelta::FromMilliseconds(1), 396 base::TimeDelta::FromMilliseconds(1),
394 base::TimeDelta::FromMinutes(10), 100); 397 base::TimeDelta::FromMinutes(10), 100);
395 } 398 }
396 } 399 }
397 400
398 } // namespace net 401 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698