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

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

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix deps, win compile error Created 8 years, 6 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.h
diff --git a/jingle/notifier/communicator/single_login_attempt.h b/jingle/notifier/communicator/single_login_attempt.h
index 1e0332da39b85b5877d6368a8851699712a8cc52..baf45e15e89688dd87eec9ae1bbbe7d6d3d0bdb4 100644
--- a/jingle/notifier/communicator/single_login_attempt.h
+++ b/jingle/notifier/communicator/single_login_attempt.h
@@ -26,13 +26,30 @@ struct ServerInformation;
// login attempt.
class SingleLoginAttempt : public XmppConnection::Delegate {
public:
+ // At most one delegate method will be called, depending on the
+ // result of the login attempt. After the delegate method is
+ // called, this class won't do anything anymore until it is
+ // destroyed, at which point it will disconnect if necessary.
class Delegate {
public:
+ // Called when the login attempt is successful.
virtual void OnConnect(
base::WeakPtr<buzz::XmppTaskParentInterface> base_task) = 0;
- virtual void OnNeedReconnect() = 0;
+
+ // Called when the server responds with a redirect. A new login
+ // attempt should be made to the given redirect server.
virtual void OnRedirect(const ServerInformation& redirect_server) = 0;
+ // Called when a server rejects the client's login credentials. A
+ // new login attempt should be made once the client provides new
+ // credentials.
+ virtual void OnCredentialsRejected() = 0;
+
+ // Called when no server could be logged into for reasons other
+ // than redirection or rejected credentials. A new login attempt
+ // may be created, but it should be done with exponential backoff.
+ virtual void OnSettingsExhausted() = 0;
+
protected:
virtual ~Delegate();
};

Powered by Google App Engine
This is Rietveld 408576698