Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: jingle/notifier/communicator/single_login_attempt.cc

Issue 4275001: [Sync] Removed more uses of libjingle's sigslot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: jingle/notifier/communicator/single_login_attempt.cc
diff --git a/jingle/notifier/communicator/single_login_attempt.cc b/jingle/notifier/communicator/single_login_attempt.cc
index 2d2fbe032b7cd1831f8ec7851ebf43d85a2d13fa..548174bce304da41452b9ae86aeaca6e532f38aa 100644
--- a/jingle/notifier/communicator/single_login_attempt.cc
+++ b/jingle/notifier/communicator/single_login_attempt.cc
@@ -28,8 +28,10 @@ class NetLog;
namespace notifier {
-SingleLoginAttempt::SingleLoginAttempt(LoginSettings* login_settings)
+SingleLoginAttempt::SingleLoginAttempt(LoginSettings* login_settings,
+ Delegate* delegate)
: login_settings_(login_settings),
+ delegate_(delegate),
connection_generator_(
ALLOW_THIS_IN_INITIALIZER_LIST(this),
login_settings_->host_resolver(),
@@ -43,7 +45,7 @@ SingleLoginAttempt::SingleLoginAttempt(LoginSettings* login_settings)
SingleLoginAttempt::~SingleLoginAttempt() {}
void SingleLoginAttempt::OnConnect(base::WeakPtr<talk_base::Task> base_task) {
- SignalConnect(base_task);
+ delegate_->OnConnect(base_task);
}
void SingleLoginAttempt::OnError(buzz::XmppEngine::Error error, int subcode,
@@ -81,7 +83,7 @@ void SingleLoginAttempt::OnError(buzz::XmppEngine::Error error, int subcode,
if (redirect_port == 0) {
redirect_port = kDefaultXmppPort;
}
- SignalRedirect(redirect_server, redirect_port);
+ delegate_->OnRedirect(redirect_server, redirect_port);
// May be deleted at this point.
return;
}
@@ -122,7 +124,7 @@ void SingleLoginAttempt::OnExhaustedSettings(
if (!successfully_resolved_dns)
VLOG(1) << "Could not resolve DNS: " << first_dns_error;
VLOG(1) << "Could not connect to any XMPP server";
- SignalNeedAutoReconnect();
+ delegate_->OnNeedReconnect();
}
} // namespace notifier
« no previous file with comments | « jingle/notifier/communicator/single_login_attempt.h ('k') | jingle/notifier/listener/mediator_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698