| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ |
| 7 | 7 |
| 8 #include "net/socket/tcp_client_socket.h" | 8 #include "net/socket/tcp_client_socket.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&)); | 41 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&)); |
| 42 MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t()); | 42 MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t()); |
| 43 | 43 |
| 44 // Methods specific to MockTCPClientSocket | 44 // Methods specific to MockTCPClientSocket |
| 45 MOCK_METHOD1(Bind, int(const net::IPEndPoint&)); | 45 MOCK_METHOD1(Bind, int(const net::IPEndPoint&)); |
| 46 MOCK_METHOD2(SetKeepAlive, bool(bool, int)); | 46 MOCK_METHOD2(SetKeepAlive, bool(bool, int)); |
| 47 MOCK_METHOD1(SetNoDelay, bool(bool)); | 47 MOCK_METHOD1(SetNoDelay, bool(bool)); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 MockTCPClientSocket::MockTCPClientSocket() | 50 MockTCPClientSocket::MockTCPClientSocket() |
| 51 : TCPClientSocket(net::AddressList(), nullptr, net::NetLog::Source()) {} | 51 : TCPClientSocket(net::AddressList(), |
| 52 nullptr, |
| 53 nullptr, |
| 54 net::NetLog::Source()) {} |
| 52 MockTCPClientSocket::~MockTCPClientSocket() {} | 55 MockTCPClientSocket::~MockTCPClientSocket() {} |
| 53 | 56 |
| 54 } // namespace extensions | 57 } // namespace extensions |
| 55 | 58 |
| 56 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ | 59 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_MOCK_TCP_CLIENT_SOCKET_H_ |
| OLD | NEW |