Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 // object for test purposes. Can be connected to other FakeTransportControllers | 28 // object for test purposes. Can be connected to other FakeTransportControllers |
| 29 // via Connect(). | 29 // via Connect(). |
| 30 // | 30 // |
| 31 // This fake is unusual in that for the most part, it's implemented with the | 31 // This fake is unusual in that for the most part, it's implemented with the |
| 32 // real TransportController code, but with fake TransportChannels underneath. | 32 // real TransportController code, but with fake TransportChannels underneath. |
| 33 class FakeTransportController : public TransportController { | 33 class FakeTransportController : public TransportController { |
| 34 public: | 34 public: |
| 35 FakeTransportController() | 35 FakeTransportController() |
| 36 : TransportController(rtc::Thread::Current(), | 36 : TransportController(rtc::Thread::Current(), |
| 37 rtc::Thread::Current(), | 37 rtc::Thread::Current(), |
| 38 nullptr) {} | 38 nullptr, |
| 39 /*redetermine_role_on_ice_restart=*/true, | |
|
Taylor Brandstetter
2017/04/17 22:00:34
I know we don't use this style typically, but I th
pthatcher1
2017/04/17 22:12:41
I don't like the look of it, but it seems like a g
| |
| 40 rtc::CryptoOptions()) {} | |
| 39 | 41 |
| 40 explicit FakeTransportController(bool redetermine_role_on_ice_restart) | 42 explicit FakeTransportController(bool redetermine_role_on_ice_restart) |
| 41 : TransportController(rtc::Thread::Current(), | 43 : TransportController(rtc::Thread::Current(), |
| 42 rtc::Thread::Current(), | 44 rtc::Thread::Current(), |
| 43 nullptr, | 45 nullptr, |
| 44 redetermine_role_on_ice_restart) {} | 46 redetermine_role_on_ice_restart, |
| 47 rtc::CryptoOptions()) {} | |
| 45 | 48 |
| 46 explicit FakeTransportController(IceRole role) | 49 explicit FakeTransportController(IceRole role) |
| 47 : TransportController(rtc::Thread::Current(), | 50 : TransportController(rtc::Thread::Current(), |
| 48 rtc::Thread::Current(), | 51 rtc::Thread::Current(), |
| 49 nullptr) { | 52 nullptr, |
| 53 /*redetermine_role_on_ice_restart=*/true, | |
| 54 rtc::CryptoOptions()) { | |
| 50 SetIceRole(role); | 55 SetIceRole(role); |
| 51 } | 56 } |
| 52 | 57 |
| 53 explicit FakeTransportController(rtc::Thread* network_thread) | 58 explicit FakeTransportController(rtc::Thread* network_thread) |
| 54 : TransportController(rtc::Thread::Current(), network_thread, nullptr) {} | 59 : TransportController(rtc::Thread::Current(), |
| 60 network_thread, | |
| 61 nullptr, | |
| 62 /*redetermine_role_on_ice_restart=*/true, | |
| 63 rtc::CryptoOptions()) {} | |
| 55 | 64 |
| 56 FakeTransportController(rtc::Thread* network_thread, IceRole role) | 65 FakeTransportController(rtc::Thread* network_thread, IceRole role) |
| 57 : TransportController(rtc::Thread::Current(), network_thread, nullptr) { | 66 : TransportController(rtc::Thread::Current(), |
| 67 network_thread, | |
| 68 nullptr, | |
| 69 /*redetermine_role_on_ice_restart=*/true, | |
| 70 rtc::CryptoOptions()) { | |
| 58 SetIceRole(role); | 71 SetIceRole(role); |
| 59 } | 72 } |
| 60 | 73 |
| 61 FakeDtlsTransport* GetFakeDtlsTransport_n(const std::string& transport_name, | 74 FakeDtlsTransport* GetFakeDtlsTransport_n(const std::string& transport_name, |
| 62 int component) { | 75 int component) { |
| 63 return static_cast<FakeDtlsTransport*>( | 76 return static_cast<FakeDtlsTransport*>( |
| 64 get_channel_for_testing(transport_name, component)); | 77 get_channel_for_testing(transport_name, component)); |
| 65 } | 78 } |
| 66 | 79 |
| 67 // Simulate the exchange of transport descriptions, and the gathering and | 80 // Simulate the exchange of transport descriptions, and the gathering and |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 bool asymmetric = false; | 150 bool asymmetric = false; |
| 138 local->SetDestination(remote, asymmetric); | 151 local->SetDestination(remote, asymmetric); |
| 139 } | 152 } |
| 140 } | 153 } |
| 141 } | 154 } |
| 142 }; | 155 }; |
| 143 | 156 |
| 144 } // namespace cricket | 157 } // namespace cricket |
| 145 | 158 |
| 146 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ | 159 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ |
| OLD | NEW |