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

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

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
« no previous file with comments | « jingle/notifier/communicator/login.cc ('k') | jingle/notifier/communicator/single_login_attempt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/communicator/single_login_attempt.h
diff --git a/jingle/notifier/communicator/single_login_attempt.h b/jingle/notifier/communicator/single_login_attempt.h
index ed8c7bf0cd17faac47749b7548b18e0af02c5ff1..6c33c519bf3f7724736f3691c2abe8037b281392 100644
--- a/jingle/notifier/communicator/single_login_attempt.h
+++ b/jingle/notifier/communicator/single_login_attempt.h
@@ -10,7 +10,6 @@
#include "base/scoped_ptr.h"
#include "jingle/notifier/base/xmpp_connection.h"
#include "jingle/notifier/communicator/xmpp_connection_generator.h"
-#include "talk/base/sigslot.h"
#include "talk/xmpp/xmppengine.h"
namespace talk_base {
@@ -29,7 +28,19 @@ class LoginSettings;
class SingleLoginAttempt : public XmppConnection::Delegate,
public XmppConnectionGenerator::Delegate {
public:
- explicit SingleLoginAttempt(LoginSettings* login_settings);
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+
+ virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0;
+ virtual void OnNeedReconnect() = 0;
+ virtual void OnRedirect(const std::string& redirect_server,
+ int redirect_port) = 0;
+ };
+
+ // Does not take ownership of |login_settings| or |delegate|.
+ // Neither may be NULL.
+ SingleLoginAttempt(LoginSettings* login_settings, Delegate* delegate);
virtual ~SingleLoginAttempt();
@@ -44,19 +55,9 @@ class SingleLoginAttempt : public XmppConnection::Delegate,
virtual void OnExhaustedSettings(bool successfully_resolved_dns,
int first_dns_error);
- // Typically handled by storing the redirect for 5 seconds, and setting it
- // into LoginSettings, then creating a new SingleLoginAttempt, and doing
- // StartConnection.
- //
- // SignalRedirect(const std::string& redirect_server, int redirect_port);
- sigslot::signal2<const std::string&, int> SignalRedirect;
-
- sigslot::signal0<> SignalNeedAutoReconnect;
-
- sigslot::signal1<base::WeakPtr<talk_base::Task> > SignalConnect;
-
private:
LoginSettings* login_settings_;
+ Delegate* delegate_;
XmppConnectionGenerator connection_generator_;
scoped_ptr<XmppConnection> xmpp_connection_;
« no previous file with comments | « jingle/notifier/communicator/login.cc ('k') | jingle/notifier/communicator/single_login_attempt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698