OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/protocol/ice_transport_channel.h" | 5 #include "remoting/protocol/ice_transport_channel.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/callback_helpers.h" | 11 #include "base/callback_helpers.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "jingle/glue/utils.h" | 14 #include "jingle/glue/utils.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "remoting/protocol/channel_socket_adapter.h" | 16 #include "remoting/protocol/channel_socket_adapter.h" |
17 #include "remoting/protocol/port_allocator_factory.h" | 17 #include "remoting/protocol/port_allocator_factory.h" |
18 #include "remoting/protocol/transport_context.h" | 18 #include "remoting/protocol/transport_context.h" |
19 #include "third_party/webrtc/base/network.h" | 19 #include "third_party/webrtc/base/network.h" |
20 #include "third_party/webrtc/p2p/base/p2pconstants.h" | 20 #include "third_party/webrtc/p2p/base/p2pconstants.h" |
21 #include "third_party/webrtc/p2p/base/p2ptransportchannel.h" | 21 #include "third_party/webrtc/p2p/base/p2ptransportchannel.h" |
22 #include "third_party/webrtc/p2p/base/port.h" | 22 #include "third_party/webrtc/p2p/base/port.h" |
23 #include "third_party/webrtc/p2p/client/httpportallocator.h" | |
24 | 23 |
25 namespace remoting { | 24 namespace remoting { |
26 namespace protocol { | 25 namespace protocol { |
27 | 26 |
28 namespace { | 27 namespace { |
29 | 28 |
30 const int kIceUfragLength = 16; | 29 const int kIceUfragLength = 16; |
31 | 30 |
32 // Utility function to map a cricket::Candidate string type to a | 31 // Utility function to map a cricket::Candidate string type to a |
33 // TransportRoute::RouteType enum value. | 32 // TransportRoute::RouteType enum value. |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 267 |
269 // Restart ICE by resetting ICE password. | 268 // Restart ICE by resetting ICE password. |
270 std::string ice_password = rtc::CreateRandomString(cricket::ICE_PWD_LENGTH); | 269 std::string ice_password = rtc::CreateRandomString(cricket::ICE_PWD_LENGTH); |
271 delegate_->OnChannelIceCredentials(this, ice_username_fragment_, | 270 delegate_->OnChannelIceCredentials(this, ice_username_fragment_, |
272 ice_password); | 271 ice_password); |
273 channel_->SetIceCredentials(ice_username_fragment_, ice_password); | 272 channel_->SetIceCredentials(ice_username_fragment_, ice_password); |
274 } | 273 } |
275 | 274 |
276 } // namespace protocol | 275 } // namespace protocol |
277 } // namespace remoting | 276 } // namespace remoting |
OLD | NEW |