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 #include "chrome/common/net/notifier/communicator/auto_reconnect.h" | 5 #include "jingle/notifier/communicator/auto_reconnect.h" |
6 | 6 |
7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
8 #include "chrome/common/net/notifier/communicator/login.h" | 8 #include "jingle/notifier/communicator/login.h" |
9 | 9 |
10 namespace notifier { | 10 namespace notifier { |
11 | 11 |
12 const int kResetReconnectInfoDelaySec = 2; | 12 const int kResetReconnectInfoDelaySec = 2; |
13 | 13 |
14 AutoReconnect::AutoReconnect() | 14 AutoReconnect::AutoReconnect() |
15 : reconnect_timer_started_(false), | 15 : reconnect_timer_started_(false), |
16 is_idle_(false) { | 16 is_idle_(false) { |
17 SetupReconnectInterval(); | 17 SetupReconnectInterval(); |
18 } | 18 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // then getting disconnect like when an account hits an abuse limit. | 116 // then getting disconnect like when an account hits an abuse limit. |
117 StopReconnectTimer(); | 117 StopReconnectTimer(); |
118 delayed_reset_timer_.Start( | 118 delayed_reset_timer_.Start( |
119 base::TimeDelta::FromSeconds(kResetReconnectInfoDelaySec), | 119 base::TimeDelta::FromSeconds(kResetReconnectInfoDelaySec), |
120 this, &AutoReconnect::ResetState); | 120 this, &AutoReconnect::ResetState); |
121 break; | 121 break; |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 } // namespace notifier | 125 } // namespace notifier |
OLD | NEW |