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

Unified Diff: jingle/notifier/listener/xmpp_push_client.cc

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/xmpp_push_client.cc
diff --git a/jingle/notifier/listener/xmpp_push_client.cc b/jingle/notifier/listener/xmpp_push_client.cc
index dcf828d8cda915f7a1c4d7857c6c5fb4f9a82c5c..b6db08853d22ae5893090abf0cc2083fb5b7789e 100644
--- a/jingle/notifier/listener/xmpp_push_client.cc
+++ b/jingle/notifier/listener/xmpp_push_client.cc
@@ -62,7 +62,14 @@ void XmppPushClient::OnDisconnect() {
DCHECK(non_thread_safe_.CalledOnValidThread());
base_task_.reset();
FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationStateChange(false));
+ OnPushClientStateChange(NOTIFICATIONS_OFF));
+}
+
+void XmppPushClient::OnRejectedCredentials() {
+ DCHECK(non_thread_safe_.CalledOnValidThread());
+ base_task_.reset();
+ FOR_EACH_OBSERVER(PushClientObserver, observers_,
+ OnPushClientStateChange(CREDENTIALS_REJECTED));
}
void XmppPushClient::OnNotificationReceived(
@@ -75,13 +82,13 @@ void XmppPushClient::OnNotificationReceived(
void XmppPushClient::OnSubscribed() {
DCHECK(non_thread_safe_.CalledOnValidThread());
FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationStateChange(true));
+ OnPushClientStateChange(NOTIFICATIONS_ON));
}
void XmppPushClient::OnSubscriptionError() {
DCHECK(non_thread_safe_.CalledOnValidThread());
FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationStateChange(false));
+ OnPushClientStateChange(NOTIFICATIONS_OFF));
}
void XmppPushClient::AddObserver(PushClientObserver* observer) {

Powered by Google App Engine
This is Rietveld 408576698