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

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

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/listener/fake_push_client_observer.cc
diff --git a/jingle/notifier/listener/fake_push_client_observer.cc b/jingle/notifier/listener/fake_push_client_observer.cc
index ec1b9e1118802faeacefdb6abb4f1bbe63044129..7b907d0fbed1da1698ef1e45840e2bfe26a61dd3 100644
--- a/jingle/notifier/listener/fake_push_client_observer.cc
+++ b/jingle/notifier/listener/fake_push_client_observer.cc
@@ -7,13 +7,17 @@
namespace notifier {
FakePushClientObserver::FakePushClientObserver()
- : notifications_enabled_(false) {}
+ :last_notifications_disabled_reason_(DEFAULT_NOTIFICATION_ERROR) {}
FakePushClientObserver::~FakePushClientObserver() {}
-void FakePushClientObserver::OnNotificationStateChange(
- bool notifications_enabled) {
- notifications_enabled_ = notifications_enabled;
+void FakePushClientObserver::OnNotificationsEnabled() {
+ last_notifications_disabled_reason_ = NO_NOTIFICATION_ERROR;
+}
+
+void FakePushClientObserver::OnNotificationsDisabled(
+ NotificationsDisabledReason reason) {
+ last_notifications_disabled_reason_ = reason;
}
void FakePushClientObserver::OnIncomingNotification(
@@ -21,8 +25,9 @@ void FakePushClientObserver::OnIncomingNotification(
last_incoming_notification_ = notification;
}
-bool FakePushClientObserver::notifications_enabled() const {
- return notifications_enabled_;
+NotificationsDisabledReason
+FakePushClientObserver::last_notifications_disabled_reason() const {
+ return last_notifications_disabled_reason_;
}
const Notification&

Powered by Google App Engine
This is Rietveld 408576698