| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "chrome/common/net/notifier/communicator/login.h" | 7 #include "chrome/common/net/notifier/communicator/login.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "talk/xmpp/xmppengine.h" | 28 #include "talk/xmpp/xmppengine.h" |
| 29 | 29 |
| 30 namespace notifier { | 30 namespace notifier { |
| 31 | 31 |
| 32 // Redirect valid for 5 minutes. | 32 // Redirect valid for 5 minutes. |
| 33 static const int kRedirectTimeoutMinutes = 5; | 33 static const int kRedirectTimeoutMinutes = 5; |
| 34 | 34 |
| 35 // Disconnect if network stays down for more than 10 seconds. | 35 // Disconnect if network stays down for more than 10 seconds. |
| 36 static const int kDisconnectionDelaySecs = 10; | 36 static const int kDisconnectionDelaySecs = 10; |
| 37 | 37 |
| 38 Login::Login(talk_base::Task* parent, | 38 Login::Login(talk_base::TaskParent* parent, |
| 39 const buzz::XmppClientSettings& user_settings, | 39 const buzz::XmppClientSettings& user_settings, |
| 40 const ConnectionOptions& options, | 40 const ConnectionOptions& options, |
| 41 std::string lang, | 41 std::string lang, |
| 42 net::HostResolver* host_resolver, | 42 net::HostResolver* host_resolver, |
| 43 ServerInformation* server_list, | 43 ServerInformation* server_list, |
| 44 int server_count, | 44 int server_count, |
| 45 net::NetworkChangeNotifier* network_change_notifier, | 45 net::NetworkChangeNotifier* network_change_notifier, |
| 46 talk_base::FirewallManager* firewall, | 46 talk_base::FirewallManager* firewall, |
| 47 bool proxy_only, | 47 bool proxy_only, |
| 48 bool previous_login_successful) | 48 bool previous_login_successful) |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 if (single_attempt_) { | 340 if (single_attempt_) { |
| 341 single_attempt_->Abort(); | 341 single_attempt_->Abort(); |
| 342 single_attempt_ = NULL; | 342 single_attempt_ = NULL; |
| 343 } | 343 } |
| 344 | 344 |
| 345 StartConnection(); | 345 StartConnection(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 } // namespace notifier | 348 } // namespace notifier |
| OLD | NEW |