| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 int Connect(const net::CompletionCallback& callback) override; | 54 int Connect(const net::CompletionCallback& callback) override; |
| 55 void Disconnect() override; | 55 void Disconnect() override; |
| 56 bool IsConnected() const override; | 56 bool IsConnected() const override; |
| 57 bool IsConnectedAndIdle() const override; | 57 bool IsConnectedAndIdle() const override; |
| 58 int GetPeerAddress(net::IPEndPoint* address) const override; | 58 int GetPeerAddress(net::IPEndPoint* address) const override; |
| 59 int GetLocalAddress(net::IPEndPoint* address) const override; | 59 int GetLocalAddress(net::IPEndPoint* address) const override; |
| 60 const net::BoundNetLog& NetLog() const override; | 60 const net::BoundNetLog& NetLog() const override; |
| 61 void SetSubresourceSpeculation() override; | 61 void SetSubresourceSpeculation() override; |
| 62 void SetOmniboxSpeculation() override; | 62 void SetOmniboxSpeculation() override; |
| 63 bool WasEverUsed() const override; | 63 bool WasEverUsed() const override; |
| 64 bool UsingTCPFastOpen() const override; | |
| 65 bool WasNpnNegotiated() const override; | 64 bool WasNpnNegotiated() const override; |
| 66 net::NextProto GetNegotiatedProtocol() const override; | 65 net::NextProto GetNegotiatedProtocol() const override; |
| 67 bool GetSSLInfo(net::SSLInfo* ssl_info) override; | 66 bool GetSSLInfo(net::SSLInfo* ssl_info) override; |
| 68 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; | 67 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; |
| 69 void ClearConnectionAttempts() override {} | 68 void ClearConnectionAttempts() override {} |
| 70 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { | 69 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { |
| 71 } | 70 } |
| 72 int64_t GetTotalReceivedBytes() const override; | 71 int64_t GetTotalReceivedBytes() const override; |
| 73 | 72 |
| 74 private: | 73 private: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 MATCHER_P(MatchIncomingSocketMessage, address, "") { | 114 MATCHER_P(MatchIncomingSocketMessage, address, "") { |
| 116 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) | 115 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) |
| 117 return false; | 116 return false; |
| 118 P2PMsg_OnIncomingTcpConnection::Param params; | 117 P2PMsg_OnIncomingTcpConnection::Param params; |
| 119 P2PMsg_OnIncomingTcpConnection::Read( | 118 P2PMsg_OnIncomingTcpConnection::Read( |
| 120 arg, ¶ms); | 119 arg, ¶ms); |
| 121 return base::get<1>(params) == address; | 120 return base::get<1>(params) == address; |
| 122 } | 121 } |
| 123 | 122 |
| 124 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ | 123 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ |
| OLD | NEW |