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

Unified Diff: net/socket/tcp_client_socket.cc

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comment Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/tcp_client_socket.cc
diff --git a/net/socket/tcp_client_socket.cc b/net/socket/tcp_client_socket.cc
index 700fa1c1655b0117d9cdb977af7b37200b77eaf5..c4522215d0be9f54031bbe62adc9b4cdc4c92d1d 100644
--- a/net/socket/tcp_client_socket.cc
+++ b/net/socket/tcp_client_socket.cc
@@ -15,13 +15,19 @@
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
+#include "net/base/socket_performance_watcher.h"
namespace net {
-TCPClientSocket::TCPClientSocket(const AddressList& addresses,
- net::NetLog* net_log,
- const net::NetLog::Source& source)
- : socket_(new TCPSocket(net_log, source)),
+TCPClientSocket::TCPClientSocket(
+ const AddressList& addresses,
+ scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+ net::NetLog* net_log,
+ const net::NetLog::Source& source)
+ : socket_performance_watcher_(socket_performance_watcher.get()),
+ socket_(new TCPSocket(std::move(socket_performance_watcher),
+ net_log,
+ source)),
addresses_(addresses),
current_address_index_(-1),
next_connect_state_(CONNECT_STATE_NONE),
@@ -121,6 +127,9 @@ int TCPClientSocket::DoConnect() {
DCHECK_GE(current_address_index_, 0);
DCHECK_LT(current_address_index_, static_cast<int>(addresses_.size()));
+ if (socket_performance_watcher_)
+ socket_performance_watcher_->OnReset();
bengr 2016/02/16 16:41:17 Does this mean you reset on the first connect?
tbansal1 2016/02/17 02:53:34 Yes.
+
const IPEndPoint& endpoint = addresses_[current_address_index_];
{

Powered by Google App Engine
This is Rietveld 408576698