Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 } | 302 } |
| 303 | 303 |
| 304 int TCPClientSocket::SetReceiveBufferSize(int32_t size) { | 304 int TCPClientSocket::SetReceiveBufferSize(int32_t size) { |
| 305 return socket_->SetReceiveBufferSize(size); | 305 return socket_->SetReceiveBufferSize(size); |
| 306 } | 306 } |
| 307 | 307 |
| 308 int TCPClientSocket::SetSendBufferSize(int32_t size) { | 308 int TCPClientSocket::SetSendBufferSize(int32_t size) { |
| 309 return socket_->SetSendBufferSize(size); | 309 return socket_->SetSendBufferSize(size); |
| 310 } | 310 } |
| 311 | 311 |
| 312 int TCPClientSocket::SetDoNotFragment(bool do_not_fragment) { | |
| 313 return socket_->SetSendBufferSize(do_not_fragment); | |
|
Jeremy Dorfman
2016/08/10 23:56:57
Copy/paste error?
Ryan Hamilton
2016/08/11 19:47:31
Indeed, but I've reverted this change since I made
| |
| 314 } | |
| 315 | |
| 312 bool TCPClientSocket::SetKeepAlive(bool enable, int delay) { | 316 bool TCPClientSocket::SetKeepAlive(bool enable, int delay) { |
| 313 return socket_->SetKeepAlive(enable, delay); | 317 return socket_->SetKeepAlive(enable, delay); |
| 314 } | 318 } |
| 315 | 319 |
| 316 bool TCPClientSocket::SetNoDelay(bool no_delay) { | 320 bool TCPClientSocket::SetNoDelay(bool no_delay) { |
| 317 return socket_->SetNoDelay(no_delay); | 321 return socket_->SetNoDelay(no_delay); |
| 318 } | 322 } |
| 319 | 323 |
| 320 void TCPClientSocket::GetConnectionAttempts(ConnectionAttempts* out) const { | 324 void TCPClientSocket::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 321 *out = connection_attempts_; | 325 *out = connection_attempts_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 void TCPClientSocket::EmitTCPMetricsHistogramsOnDisconnect() { | 391 void TCPClientSocket::EmitTCPMetricsHistogramsOnDisconnect() { |
| 388 base::TimeDelta rtt; | 392 base::TimeDelta rtt; |
| 389 if (socket_->GetEstimatedRoundTripTime(&rtt)) { | 393 if (socket_->GetEstimatedRoundTripTime(&rtt)) { |
| 390 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TcpRtt.AtDisconnect", rtt, | 394 UMA_HISTOGRAM_CUSTOM_TIMES("Net.TcpRtt.AtDisconnect", rtt, |
| 391 base::TimeDelta::FromMilliseconds(1), | 395 base::TimeDelta::FromMilliseconds(1), |
| 392 base::TimeDelta::FromMinutes(10), 100); | 396 base::TimeDelta::FromMinutes(10), 100); |
| 393 } | 397 } |
| 394 } | 398 } |
| 395 | 399 |
| 396 } // namespace net | 400 } // namespace net |
| OLD | NEW |