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 #include "remoting/test/fake_port_allocator.h" | 5 #include "remoting/test/fake_port_allocator.h" |
6 | 6 |
7 #include "remoting/test/fake_network_dispatcher.h" | 7 #include "remoting/test/fake_network_dispatcher.h" |
8 #include "remoting/test/fake_network_manager.h" | 8 #include "remoting/test/fake_network_manager.h" |
9 #include "remoting/test/fake_socket_factory.h" | 9 #include "remoting/test/fake_socket_factory.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 class FakePortAllocatorSession | 15 class FakePortAllocatorSession |
16 : public cricket::HttpPortAllocatorSessionBase { | 16 : public cricket::HttpPortAllocatorSessionBase { |
17 public: | 17 public: |
18 FakePortAllocatorSession( | 18 FakePortAllocatorSession( |
19 cricket::HttpPortAllocatorBase* allocator, | 19 cricket::HttpPortAllocatorBase* allocator, |
20 const std::string& content_name, | 20 const std::string& content_name, |
21 int component, | 21 int component, |
22 const std::string& ice_username_fragment, | 22 const std::string& ice_username_fragment, |
23 const std::string& ice_password, | 23 const std::string& ice_password, |
24 const std::vector<rtc::SocketAddress>& stun_hosts, | 24 const std::vector<rtc::SocketAddress>& stun_hosts, |
25 const std::vector<std::string>& relay_hosts, | 25 const std::vector<std::string>& relay_hosts, |
26 const std::string& relay); | 26 const std::string& relay); |
27 virtual ~FakePortAllocatorSession(); | 27 virtual ~FakePortAllocatorSession(); |
28 | 28 |
29 // cricket::HttpPortAllocatorBase overrides. | 29 // cricket::HttpPortAllocatorBase overrides. |
30 virtual void ConfigReady(cricket::PortConfiguration* config) OVERRIDE; | 30 virtual void ConfigReady(cricket::PortConfiguration* config) override; |
31 virtual void SendSessionRequest(const std::string& host, int port) OVERRIDE; | 31 virtual void SendSessionRequest(const std::string& host, int port) override; |
32 | 32 |
33 private: | 33 private: |
34 DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorSession); | 34 DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorSession); |
35 }; | 35 }; |
36 | 36 |
37 FakePortAllocatorSession::FakePortAllocatorSession( | 37 FakePortAllocatorSession::FakePortAllocatorSession( |
38 cricket::HttpPortAllocatorBase* allocator, | 38 cricket::HttpPortAllocatorBase* allocator, |
39 const std::string& content_name, | 39 const std::string& content_name, |
40 int component, | 40 int component, |
41 const std::string& ice_username_fragment, | 41 const std::string& ice_username_fragment, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const std::string& content_name, | 115 const std::string& content_name, |
116 int component, | 116 int component, |
117 const std::string& ice_username_fragment, | 117 const std::string& ice_username_fragment, |
118 const std::string& ice_password) { | 118 const std::string& ice_password) { |
119 return new FakePortAllocatorSession( | 119 return new FakePortAllocatorSession( |
120 this, content_name, component, ice_username_fragment, ice_password, | 120 this, content_name, component, ice_username_fragment, ice_password, |
121 stun_hosts(), relay_hosts(), relay_token()); | 121 stun_hosts(), relay_hosts(), relay_token()); |
122 } | 122 } |
123 | 123 |
124 } // namespace remoting | 124 } // namespace remoting |
OLD | NEW |