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

Unified Diff: jingle/notifier/listener/push_client_observer.h

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix 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/listener/push_client_observer.h
diff --git a/jingle/notifier/listener/push_client_observer.h b/jingle/notifier/listener/push_client_observer.h
index 0fe7d467295746bca2689611847c06a7cd4575eb..2aed2e24f6e33c3bc48b74d5bdf20484c0791071 100644
--- a/jingle/notifier/listener/push_client_observer.h
+++ b/jingle/notifier/listener/push_client_observer.h
@@ -9,6 +9,17 @@
namespace notifier {
+enum PushClientState {
+ // Notifications can be sent and received freely.
+ NOTIFICATIONS_ON,
+ // No notifications can be sent or received. This is a transient state.
+ NOTIFICATIONS_OFF,
+ // Credentials were rejected, so no notifications can be sent or
+ // received. This state persists until a successful connection with
+ // updated auth credentials.
+ CREDENTIALS_REJECTED
+};
+
// A PushClientObserver is notified whenever an incoming notification
// is received or when the state of the push client changes.
class PushClientObserver {
@@ -16,11 +27,9 @@ class PushClientObserver {
virtual ~PushClientObserver();
public:
- // Called when the state of the push client changes. If
- // |notifications_enabled| is true, that means notifications can be
- // sent and received freely. If it is false, that means no
- // notifications can be sent or received.
- virtual void OnNotificationStateChange(bool notifications_enabled) = 0;
+ // Called when the state of the push client changes.
+ virtual void OnPushClientStateChange(
+ PushClientState push_client_state) = 0;
// Called when a notification is received. The details of the
// notification are in |notification|.

Powered by Google App Engine
This is Rietveld 408576698