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

Unified Diff: jingle/notifier/communicator/login.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 | « no previous file | jingle/notifier/communicator/login.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/communicator/login.h
diff --git a/jingle/notifier/communicator/login.h b/jingle/notifier/communicator/login.h
index b66ee7b4db8e6bbc947aab3fe3f1a92ba230a79e..d80de6c40c40339d0228f2901c83ac854de2c33f 100644
--- a/jingle/notifier/communicator/login.h
+++ b/jingle/notifier/communicator/login.h
@@ -11,9 +11,8 @@
#include "base/time.h"
#include "base/timer.h"
#include "base/weak_ptr.h"
+#include "jingle/notifier/communicator/single_login_attempt.h"
#include "net/base/network_change_notifier.h"
-#include "talk/base/proxyinfo.h"
-#include "talk/base/sigslot.h"
#include "talk/xmpp/xmppengine.h"
namespace buzz {
@@ -36,16 +35,25 @@ namespace notifier {
class ConnectionOptions;
class LoginSettings;
struct ServerInformation;
-class SingleLoginAttempt;
// Does the login, keeps it alive (with refreshing cookies and reattempting
// login when disconnected), figures out what actions to take on the various
// errors that may occur.
class Login : public net::NetworkChangeNotifier::Observer,
- public sigslot::has_slots<> {
+ public SingleLoginAttempt::Delegate {
public:
- // firewall may be NULL.
- Login(const buzz::XmppClientSettings& user_settings,
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+
+ virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0;
+ virtual void OnDisconnect() = 0;
+ };
+
+ // Does not take ownership of |delegate|, |host_resolver|, or
+ // |server_list|, none of which may be NULL.
+ Login(Delegate* delegate,
+ const buzz::XmppClientSettings& user_settings,
const ConnectionOptions& options,
net::HostResolver* host_resolver,
ServerInformation* server_list,
@@ -58,13 +66,14 @@ class Login : public net::NetworkChangeNotifier::Observer,
// net::NetworkChangeNotifier::Observer implementation.
virtual void OnIPAddressChanged();
- sigslot::signal1<base::WeakPtr<talk_base::Task> > SignalConnect;
- sigslot::signal0<> SignalDisconnect;
+ // SingleLoginAttempt::Delegate implementation.
+ virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task);
+ virtual void OnNeedReconnect();
+ virtual void OnRedirect(const std::string& redirect_server,
+ int redirect_port);
private:
void OnLogoff();
- void OnRedirect(const std::string& redirect_server, int redirect_port);
- void OnConnect(base::WeakPtr<talk_base::Task> parent);
// Stops any existing reconnect timer and sets an initial reconnect
// interval.
@@ -78,7 +87,7 @@ class Login : public net::NetworkChangeNotifier::Observer,
// reconnection.
void DoReconnect();
- talk_base::TaskParent* parent_;
+ Delegate* delegate_;
scoped_ptr<LoginSettings> login_settings_;
scoped_ptr<SingleLoginAttempt> single_attempt_;
« no previous file with comments | « no previous file | jingle/notifier/communicator/login.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698