| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_AUTO_RECONNECT_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_AUTO_RECONNECT_H_ |
| 6 #define CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_AUTO_RECONNECT_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_AUTO_RECONNECT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "base/timer.h" | 11 #include "base/timer.h" |
| 12 #include "chrome/common/net/notifier/communicator/login_connection_state.h" | 12 #include "jingle/notifier/communicator/login_connection_state.h" |
| 13 #include "talk/base/sigslot.h" | 13 #include "talk/base/sigslot.h" |
| 14 | 14 |
| 15 namespace notifier { | 15 namespace notifier { |
| 16 | 16 |
| 17 class AutoReconnect : public sigslot::has_slots<> { | 17 class AutoReconnect : public sigslot::has_slots<> { |
| 18 public: | 18 public: |
| 19 AutoReconnect(); | 19 AutoReconnect(); |
| 20 void StartReconnectTimer(); | 20 void StartReconnectTimer(); |
| 21 void StopReconnectTimer(); | 21 void StopReconnectTimer(); |
| 22 void OnClientStateChange(LoginConnectionState state); | 22 void OnClientStateChange(LoginConnectionState state); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Wait 2 seconds until after we actually connect to reset reconnect related | 57 // Wait 2 seconds until after we actually connect to reset reconnect related |
| 58 // items. | 58 // items. |
| 59 // | 59 // |
| 60 // The reason for this delay is to avoid the situation in which buzz is trying | 60 // The reason for this delay is to avoid the situation in which buzz is trying |
| 61 // to block the client due to abuse and the client responses by going into | 61 // to block the client due to abuse and the client responses by going into |
| 62 // rapid reconnect mode, which makes the problem more severe. | 62 // rapid reconnect mode, which makes the problem more severe. |
| 63 extern const int kResetReconnectInfoDelaySec; | 63 extern const int kResetReconnectInfoDelaySec; |
| 64 | 64 |
| 65 } // namespace notifier | 65 } // namespace notifier |
| 66 | 66 |
| 67 #endif // CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_AUTO_RECONNECT_H_ | 67 #endif // JINGLE_NOTIFIER_COMMUNICATOR_AUTO_RECONNECT_H_ |
| OLD | NEW |