| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/libjingle_transport_factory.h" | 5 #include "remoting/protocol/libjingle_transport_factory.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| 11 #include "jingle/glue/channel_socket_adapter.h" | 11 #include "jingle/glue/channel_socket_adapter.h" |
| 12 #include "jingle/glue/utils.h" | 12 #include "jingle/glue/utils.h" |
| 13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 14 #include "remoting/protocol/network_settings.h" | 14 #include "remoting/protocol/network_settings.h" |
| 15 #include "remoting/signaling/jingle_info_request.h" | 15 #include "remoting/signaling/jingle_info_request.h" |
| 16 #include "third_party/libjingle/source/talk/p2p/base/constants.h" | |
| 17 #include "third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h" | |
| 18 #include "third_party/libjingle/source/talk/p2p/base/port.h" | |
| 19 #include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h" | |
| 20 #include "third_party/libjingle/source/talk/p2p/client/httpportallocator.h" | |
| 21 #include "third_party/webrtc/base/network.h" | 16 #include "third_party/webrtc/base/network.h" |
| 17 #include "third_party/webrtc/p2p/base/constants.h" |
| 18 #include "third_party/webrtc/p2p/base/p2ptransportchannel.h" |
| 19 #include "third_party/webrtc/p2p/base/port.h" |
| 20 #include "third_party/webrtc/p2p/client/basicportallocator.h" |
| 21 #include "third_party/webrtc/p2p/client/httpportallocator.h" |
| 22 | 22 |
| 23 namespace remoting { | 23 namespace remoting { |
| 24 namespace protocol { | 24 namespace protocol { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Try connecting ICE twice with timeout of 15 seconds for each attempt. | 28 // Try connecting ICE twice with timeout of 15 seconds for each attempt. |
| 29 const int kMaxReconnectAttempts = 2; | 29 const int kMaxReconnectAttempts = 2; |
| 30 const int kReconnectDelaySeconds = 15; | 30 const int kReconnectDelaySeconds = 15; |
| 31 | 31 |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 last_jingle_info_update_time_ = base::TimeTicks::Now(); | 389 last_jingle_info_update_time_ = base::TimeTicks::Now(); |
| 390 | 390 |
| 391 while (!on_jingle_info_callbacks_.empty()) { | 391 while (!on_jingle_info_callbacks_.empty()) { |
| 392 on_jingle_info_callbacks_.begin()->Run(); | 392 on_jingle_info_callbacks_.begin()->Run(); |
| 393 on_jingle_info_callbacks_.pop_front(); | 393 on_jingle_info_callbacks_.pop_front(); |
| 394 } | 394 } |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace protocol | 397 } // namespace protocol |
| 398 } // namespace remoting | 398 } // namespace remoting |
| OLD | NEW |