OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <netdb.h> | 9 #include <netdb.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 | 602 |
603 int TCPClientSocketLibevent::GetPeerAddress(AddressList* address) const { | 603 int TCPClientSocketLibevent::GetPeerAddress(AddressList* address) const { |
604 DCHECK(CalledOnValidThread()); | 604 DCHECK(CalledOnValidThread()); |
605 DCHECK(address); | 605 DCHECK(address); |
606 if (!IsConnected()) | 606 if (!IsConnected()) |
607 return ERR_SOCKET_NOT_CONNECTED; | 607 return ERR_SOCKET_NOT_CONNECTED; |
608 address->Copy(current_ai_, false); | 608 address->Copy(current_ai_, false); |
609 return OK; | 609 return OK; |
610 } | 610 } |
611 | 611 |
| 612 const BoundNetLog& TCPClientSocketLibevent::NetLog() const { |
| 613 return net_log_; |
| 614 } |
| 615 |
612 void TCPClientSocketLibevent::SetSubresourceSpeculation() { | 616 void TCPClientSocketLibevent::SetSubresourceSpeculation() { |
613 use_history_.set_subresource_speculation(); | 617 use_history_.set_subresource_speculation(); |
614 } | 618 } |
615 | 619 |
616 void TCPClientSocketLibevent::SetOmniboxSpeculation() { | 620 void TCPClientSocketLibevent::SetOmniboxSpeculation() { |
617 use_history_.set_omnibox_speculation(); | 621 use_history_.set_omnibox_speculation(); |
618 } | 622 } |
619 | 623 |
620 bool TCPClientSocketLibevent::WasEverUsed() const { | 624 bool TCPClientSocketLibevent::WasEverUsed() const { |
621 return use_history_.was_used_to_convey_data(); | 625 return use_history_.was_used_to_convey_data(); |
622 } | 626 } |
623 | 627 |
624 bool TCPClientSocketLibevent::UsingTCPFastOpen() const { | 628 bool TCPClientSocketLibevent::UsingTCPFastOpen() const { |
625 return use_tcp_fastopen_; | 629 return use_tcp_fastopen_; |
626 } | 630 } |
627 | 631 |
628 } // namespace net | 632 } // namespace net |
OLD | NEW |