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

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

Issue 1898603002: Move Network Quality Estimator files to //net/nqe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, removed //net/socket/OWNERS Created 4 years, 7 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/socket/socket_test_util.h ('k') | net/socket/tcp_client_socket_unittest.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) 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"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/profiler/scoped_tracker.h" 12 #include "base/profiler/scoped_tracker.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "net/base/io_buffer.h" 14 #include "net/base/io_buffer.h"
15 #include "net/base/ip_endpoint.h" 15 #include "net/base/ip_endpoint.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "net/base/socket_performance_watcher.h" 17 #include "net/socket/socket_performance_watcher.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 TCPClientSocket::TCPClientSocket( 21 TCPClientSocket::TCPClientSocket(
22 const AddressList& addresses, 22 const AddressList& addresses,
23 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, 23 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
24 net::NetLog* net_log, 24 net::NetLog* net_log,
25 const net::NetLog::Source& source) 25 const net::NetLog::Source& source)
26 : socket_performance_watcher_(socket_performance_watcher.get()), 26 : socket_performance_watcher_(socket_performance_watcher.get()),
27 socket_(new TCPSocket(std::move(socket_performance_watcher), 27 socket_(new TCPSocket(std::move(socket_performance_watcher),
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 void TCPClientSocket::EmitTCPMetricsHistogramsOnDisconnect() { 387 void TCPClientSocket::EmitTCPMetricsHistogramsOnDisconnect() {
388 base::TimeDelta rtt; 388 base::TimeDelta rtt;
389 if (socket_->GetEstimatedRoundTripTime(&rtt)) { 389 if (socket_->GetEstimatedRoundTripTime(&rtt)) {
390 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TcpRtt.AtDisconnect", rtt, 390 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TcpRtt.AtDisconnect", rtt,
391 base::TimeDelta::FromMilliseconds(1), 391 base::TimeDelta::FromMilliseconds(1),
392 base::TimeDelta::FromMinutes(10), 100); 392 base::TimeDelta::FromMinutes(10), 100);
393 } 393 }
394 } 394 }
395 395
396 } // namespace net 396 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698