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

Unified Diff: net/socket/tcp_client_socket_libevent.cc

Issue 12886034: Remove experimental code to pick the "warmest" socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync, fix conflict Created 7 years, 9 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
« no previous file with comments | « net/socket/tcp_client_socket_libevent.h ('k') | net/socket/tcp_client_socket_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_libevent.cc
===================================================================
--- net/socket/tcp_client_socket_libevent.cc (revision 191149)
+++ net/socket/tcp_client_socket_libevent.cc (working copy)
@@ -137,8 +137,7 @@
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_SOCKET)),
previously_disconnected_(false),
use_tcp_fastopen_(IsTCPFastOpenEnabled()),
- tcp_fastopen_connected_(false),
- num_bytes_read_(0) {
+ tcp_fastopen_connected_(false) {
net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE,
source.ToEventParametersCallback());
}
@@ -294,7 +293,6 @@
if (!endpoint.ToSockAddr(storage.addr, &storage.addr_len))
return ERR_INVALID_ARGUMENT;
- connect_start_time_ = base::TimeTicks::Now();
if (!HANDLE_EINTR(connect(socket_, storage.addr, storage.addr_len))) {
// Connected without waiting!
return OK;
@@ -335,7 +333,6 @@
}
if (result == OK) {
- connect_time_micros_ = base::TimeTicks::Now() - connect_start_time_;
write_socket_watcher_.StopWatchingFileDescriptor();
use_history_.set_was_ever_connected();
return OK; // Done!
@@ -439,7 +436,6 @@
if (nread >= 0) {
base::StatsCounter read_bytes("tcp.read_bytes");
read_bytes.Add(nread);
- num_bytes_read_ += static_cast<int64>(nread);
if (nread > 0)
use_history_.set_was_used_to_convey_data();
net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED, nread,
@@ -668,7 +664,6 @@
result = bytes_transferred;
base::StatsCounter read_bytes("tcp.read_bytes");
read_bytes.Add(bytes_transferred);
- num_bytes_read_ += static_cast<int64>(bytes_transferred);
if (bytes_transferred > 0)
use_history_.set_was_used_to_convey_data();
net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED, result,
@@ -769,14 +764,6 @@
return use_tcp_fastopen_;
}
-int64 TCPClientSocketLibevent::NumBytesRead() const {
- return num_bytes_read_;
-}
-
-base::TimeDelta TCPClientSocketLibevent::GetConnectTimeMicros() const {
- return connect_time_micros_;
-}
-
bool TCPClientSocketLibevent::WasNpnNegotiated() const {
return false;
}
« no previous file with comments | « net/socket/tcp_client_socket_libevent.h ('k') | net/socket/tcp_client_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698