| Index: net/socket/tcp_socket_libevent.cc
|
| diff --git a/net/socket/tcp_socket_libevent.cc b/net/socket/tcp_socket_libevent.cc
|
| index 444e3c04231ce3f5279e56dad7e43d557d7bc86e..5bab98e8d88816833b72587d3f838e55dcb575c7 100644
|
| --- a/net/socket/tcp_socket_libevent.cc
|
| +++ b/net/socket/tcp_socket_libevent.cc
|
| @@ -369,6 +369,11 @@ bool TCPSocketLibevent::UsingTCPFastOpen() const {
|
| return use_tcp_fastopen_;
|
| }
|
|
|
| +void TCPSocketLibevent::EnableTCPFastOpen() {
|
| + if (!use_tcp_fastopen_ && IsTCPFastOpenSupported())
|
| + use_tcp_fastopen_ = true;
|
| +}
|
| +
|
| bool TCPSocketLibevent::IsValid() const {
|
| return socket_ != NULL && socket_->socket_fd() != kInvalidSocket;
|
| }
|
| @@ -495,7 +500,7 @@ void TCPSocketLibevent::ReadCompleted(const scoped_refptr<IOBuffer>& buf,
|
| const CompletionCallback& callback,
|
| int rv) {
|
| DCHECK_NE(ERR_IO_PENDING, rv);
|
| - // Records fast open status regardless of error in asynchronous case.
|
| + // Records TCP FastOpen status regardless of error in asynchronous case.
|
| // TODO(rdsmith,jri): Change histogram name to indicate it could be called on
|
| // error.
|
| RecordFastOpenStatus();
|
| @@ -597,7 +602,7 @@ void TCPSocketLibevent::RecordFastOpenStatus() {
|
| bool getsockopt_success(false);
|
| bool server_acked_data(false);
|
| #if defined(TCP_INFO)
|
| - // Probe to see the if the socket used TCP Fast Open.
|
| + // Probe to see the if the socket used TCP FastOpen.
|
| tcp_info info;
|
| socklen_t info_len = sizeof(tcp_info);
|
| getsockopt_success =
|
|
|