| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ | 5 #ifndef REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| 6 #define REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ | 6 #define REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // control bandwidth. | 45 // control bandwidth. |
| 46 void SetLatency(base::TimeDelta average, base::TimeDelta stddev); | 46 void SetLatency(base::TimeDelta average, base::TimeDelta stddev); |
| 47 | 47 |
| 48 void set_out_of_order_rate(double out_of_order_rate) { | 48 void set_out_of_order_rate(double out_of_order_rate) { |
| 49 out_of_order_rate_ = out_of_order_rate; | 49 out_of_order_rate_ = out_of_order_rate; |
| 50 } | 50 } |
| 51 | 51 |
| 52 // rtc::PacketSocketFactory interface. | 52 // rtc::PacketSocketFactory interface. |
| 53 rtc::AsyncPacketSocket* CreateUdpSocket( | 53 rtc::AsyncPacketSocket* CreateUdpSocket( |
| 54 const rtc::SocketAddress& local_address, | 54 const rtc::SocketAddress& local_address, |
| 55 int min_port, | 55 uint16 min_port, |
| 56 int max_port) override; | 56 uint16 max_port) override; |
| 57 rtc::AsyncPacketSocket* CreateServerTcpSocket( | 57 rtc::AsyncPacketSocket* CreateServerTcpSocket( |
| 58 const rtc::SocketAddress& local_address, | 58 const rtc::SocketAddress& local_address, |
| 59 int min_port, | 59 uint16 min_port, |
| 60 int max_port, | 60 uint16 max_port, |
| 61 int opts) override; | 61 int opts) override; |
| 62 rtc::AsyncPacketSocket* CreateClientTcpSocket( | 62 rtc::AsyncPacketSocket* CreateClientTcpSocket( |
| 63 const rtc::SocketAddress& local_address, | 63 const rtc::SocketAddress& local_address, |
| 64 const rtc::SocketAddress& remote_address, | 64 const rtc::SocketAddress& remote_address, |
| 65 const rtc::ProxyInfo& proxy_info, | 65 const rtc::ProxyInfo& proxy_info, |
| 66 const std::string& user_agent, | 66 const std::string& user_agent, |
| 67 int opts) override; | 67 int opts) override; |
| 68 rtc::AsyncResolverInterface* CreateAsyncResolver() override; | 68 rtc::AsyncResolverInterface* CreateAsyncResolver() override; |
| 69 | 69 |
| 70 // FakeNetworkDispatcher::Node interface. | 70 // FakeNetworkDispatcher::Node interface. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 std::list<PendingPacket> pending_packets_; | 115 std::list<PendingPacket> pending_packets_; |
| 116 | 116 |
| 117 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; | 117 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); | 119 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace remoting | 122 } // namespace remoting |
| 123 | 123 |
| 124 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ | 124 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| OLD | NEW |