Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: remoting/test/fake_socket_factory.h

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/test/fake_remote_host_info_fetcher.h ('k') | remoting/test/fake_socket_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h>
9
8 #include <list> 10 #include <list>
9 11
10 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
11 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
13 #include "remoting/test/fake_network_dispatcher.h" 16 #include "remoting/test/fake_network_dispatcher.h"
14 #include "third_party/webrtc/p2p/base/packetsocketfactory.h" 17 #include "third_party/webrtc/p2p/base/packetsocketfactory.h"
15 18
16 namespace remoting { 19 namespace remoting {
17 20
18 class FakeNetworkDispatcher; 21 class FakeNetworkDispatcher;
19 class LeakyBucket; 22 class LeakyBucket;
20 23
21 class FakePacketSocketFactory : public rtc::PacketSocketFactory, 24 class FakePacketSocketFactory : public rtc::PacketSocketFactory,
(...skipping 23 matching lines...) Expand all
45 // control bandwidth. 48 // control bandwidth.
46 void SetLatency(base::TimeDelta average, base::TimeDelta stddev); 49 void SetLatency(base::TimeDelta average, base::TimeDelta stddev);
47 50
48 void set_out_of_order_rate(double out_of_order_rate) { 51 void set_out_of_order_rate(double out_of_order_rate) {
49 out_of_order_rate_ = out_of_order_rate; 52 out_of_order_rate_ = out_of_order_rate;
50 } 53 }
51 54
52 // rtc::PacketSocketFactory interface. 55 // rtc::PacketSocketFactory interface.
53 rtc::AsyncPacketSocket* CreateUdpSocket( 56 rtc::AsyncPacketSocket* CreateUdpSocket(
54 const rtc::SocketAddress& local_address, 57 const rtc::SocketAddress& local_address,
55 uint16 min_port, 58 uint16_t min_port,
56 uint16 max_port) override; 59 uint16_t max_port) override;
57 rtc::AsyncPacketSocket* CreateServerTcpSocket( 60 rtc::AsyncPacketSocket* CreateServerTcpSocket(
58 const rtc::SocketAddress& local_address, 61 const rtc::SocketAddress& local_address,
59 uint16 min_port, 62 uint16_t min_port,
60 uint16 max_port, 63 uint16_t max_port,
61 int opts) override; 64 int opts) override;
62 rtc::AsyncPacketSocket* CreateClientTcpSocket( 65 rtc::AsyncPacketSocket* CreateClientTcpSocket(
63 const rtc::SocketAddress& local_address, 66 const rtc::SocketAddress& local_address,
64 const rtc::SocketAddress& remote_address, 67 const rtc::SocketAddress& remote_address,
65 const rtc::ProxyInfo& proxy_info, 68 const rtc::ProxyInfo& proxy_info,
66 const std::string& user_agent, 69 const std::string& user_agent,
67 int opts) override; 70 int opts) override;
68 rtc::AsyncResolverInterface* CreateAsyncResolver() override; 71 rtc::AsyncResolverInterface* CreateAsyncResolver() override;
69 72
70 // FakeNetworkDispatcher::Node interface. 73 // FakeNetworkDispatcher::Node interface.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 std::list<PendingPacket> pending_packets_; 118 std::list<PendingPacket> pending_packets_;
116 119
117 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; 120 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_;
118 121
119 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); 122 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory);
120 }; 123 };
121 124
122 } // namespace remoting 125 } // namespace remoting
123 126
124 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ 127 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_
OLDNEW
« no previous file with comments | « remoting/test/fake_remote_host_info_fetcher.h ('k') | remoting/test/fake_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698