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

Side by Side Diff: remoting/protocol/libjingle_transport_factory.cc

Issue 1420273002: Add TransportSession interface to prepare for WebRTC-based transport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/thread_task_runner_handle.h" 12 #include "base/thread_task_runner_handle.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.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/network_settings.h" 17 #include "remoting/protocol/network_settings.h"
18 #include "remoting/signaling/jingle_info_request.h" 18 #include "remoting/signaling/jingle_info_request.h"
19 #include "third_party/webrtc/base/network.h" 19 #include "third_party/webrtc/base/network.h"
20 #include "third_party/webrtc/p2p/base/constants.h" 20 #include "third_party/webrtc/p2p/base/constants.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/basicportallocator.h"
24 #include "third_party/webrtc/p2p/client/httpportallocator.h" 23 #include "third_party/webrtc/p2p/client/httpportallocator.h"
25 24
26 namespace remoting { 25 namespace remoting {
27 namespace protocol { 26 namespace protocol {
28 27
29 namespace { 28 namespace {
30 29
31 // Try connecting ICE twice with timeout of 15 seconds for each attempt. 30 // Try connecting ICE twice with timeout of 15 seconds for each attempt.
32 const int kMaxReconnectAttempts = 2; 31 const int kMaxReconnectAttempts = 2;
33 const int kReconnectDelaySeconds = 15; 32 const int kReconnectDelaySeconds = 15;
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 last_jingle_info_update_time_ = base::TimeTicks::Now(); 443 last_jingle_info_update_time_ = base::TimeTicks::Now();
445 444
446 while (!on_jingle_info_callbacks_.empty()) { 445 while (!on_jingle_info_callbacks_.empty()) {
447 on_jingle_info_callbacks_.begin()->Run(); 446 on_jingle_info_callbacks_.begin()->Run();
448 on_jingle_info_callbacks_.pop_front(); 447 on_jingle_info_callbacks_.pop_front();
449 } 448 }
450 } 449 }
451 450
452 } // namespace protocol 451 } // namespace protocol
453 } // namespace remoting 452 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/libjingle_transport_factory.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698