| 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 "jingle/notifier/communicator/login.h" | 5 #include "jingle/notifier/communicator/login.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "net/base/host_port_pair.h" | 12 #include "net/base/host_port_pair.h" |
| 13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 13 #include "third_party/xmllite/xmlelement.h" |
| 14 #include "third_party/xmpp/asyncsocket.h" |
| 15 #include "third_party/xmpp/prexmppauth.h" |
| 16 #include "third_party/xmpp/xmppclient.h" |
| 17 #include "third_party/xmpp/xmppclientsettings.h" |
| 18 #include "third_party/xmpp/xmppengine.h" |
| 14 #include "webrtc/base/common.h" | 19 #include "webrtc/base/common.h" |
| 15 #include "webrtc/base/firewallsocketserver.h" | 20 #include "webrtc/base/firewallsocketserver.h" |
| 16 #include "webrtc/base/logging.h" | 21 #include "webrtc/base/logging.h" |
| 17 #include "webrtc/base/physicalsocketserver.h" | 22 #include "webrtc/base/physicalsocketserver.h" |
| 18 #include "webrtc/base/taskrunner.h" | 23 #include "webrtc/base/taskrunner.h" |
| 19 #include "webrtc/libjingle/xmpp/asyncsocket.h" | |
| 20 #include "webrtc/libjingle/xmpp/prexmppauth.h" | |
| 21 #include "webrtc/libjingle/xmpp/xmppclient.h" | |
| 22 #include "webrtc/libjingle/xmpp/xmppclientsettings.h" | |
| 23 #include "webrtc/libjingle/xmpp/xmppengine.h" | |
| 24 | 24 |
| 25 namespace notifier { | 25 namespace notifier { |
| 26 | 26 |
| 27 Login::Delegate::~Delegate() {} | 27 Login::Delegate::~Delegate() {} |
| 28 | 28 |
| 29 Login::Login(Delegate* delegate, | 29 Login::Login(Delegate* delegate, |
| 30 const buzz::XmppClientSettings& user_settings, | 30 const buzz::XmppClientSettings& user_settings, |
| 31 const scoped_refptr<net::URLRequestContextGetter>& | 31 const scoped_refptr<net::URLRequestContextGetter>& |
| 32 request_context_getter, | 32 request_context_getter, |
| 33 const ServerList& servers, | 33 const ServerList& servers, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 const base::TimeDelta kMaxReconnectInterval = | 136 const base::TimeDelta kMaxReconnectInterval = |
| 137 base::TimeDelta::FromMinutes(30); | 137 base::TimeDelta::FromMinutes(30); |
| 138 reconnect_interval_ *= 2; | 138 reconnect_interval_ *= 2; |
| 139 if (reconnect_interval_ > kMaxReconnectInterval) | 139 if (reconnect_interval_ > kMaxReconnectInterval) |
| 140 reconnect_interval_ = kMaxReconnectInterval; | 140 reconnect_interval_ = kMaxReconnectInterval; |
| 141 DVLOG(1) << "Reconnecting..."; | 141 DVLOG(1) << "Reconnecting..."; |
| 142 StartConnection(); | 142 StartConnection(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace notifier | 145 } // namespace notifier |
| OLD | NEW |