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 #ifndef REMOTING_HOST_SIGNALING_CONNECTOR_H_ | 5 #ifndef REMOTING_HOST_SIGNALING_CONNECTOR_H_ |
6 #define REMOTING_HOST_SIGNALING_CONNECTOR_H_ | 6 #define REMOTING_HOST_SIGNALING_CONNECTOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
12 #include "net/base/network_change_notifier.h" | 12 #include "net/base/network_change_notifier.h" |
13 #include "remoting/host/oauth_token_getter.h" | 13 #include "remoting/host/oauth_token_getter.h" |
14 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | 14 #include "remoting/signaling/xmpp_signal_strategy.h" |
15 | 15 |
16 namespace remoting { | 16 namespace remoting { |
17 | 17 |
18 class DnsBlackholeChecker; | 18 class DnsBlackholeChecker; |
19 | 19 |
20 // SignalingConnector listens for SignalStrategy status notifications | 20 // SignalingConnector listens for SignalStrategy status notifications |
21 // and attempts to keep it connected when possible. When signalling is | 21 // and attempts to keep it connected when possible. When signalling is |
22 // not connected it keeps trying to reconnect it until it is | 22 // not connected it keeps trying to reconnect it until it is |
23 // connected. It limits connection attempt rate using exponential | 23 // connected. It limits connection attempt rate using exponential |
24 // backoff. It also monitors network state and reconnects signalling | 24 // backoff. It also monitors network state and reconnects signalling |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 int reconnect_attempts_; | 77 int reconnect_attempts_; |
78 | 78 |
79 base::OneShotTimer<SignalingConnector> timer_; | 79 base::OneShotTimer<SignalingConnector> timer_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); | 81 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace remoting | 84 } // namespace remoting |
85 | 85 |
86 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H_ | 86 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H_ |
OLD | NEW |