diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-18 20:50:28 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-18 20:50:28 +0000 |
commit | 2d3d1d19828e0ad8ef5218a2cd7967079e13a1c8 (patch) | |
tree | 1469346ebe8cd33fe3c98aba590b53e6e90fb0ee /sync/notifier/p2p_notifier.h | |
parent | e341fb8781ffac9f1a6e166a2b304137508f58ff (diff) | |
download | chromium_src-2d3d1d19828e0ad8ef5218a2cd7967079e13a1c8.zip chromium_src-2d3d1d19828e0ad8ef5218a2cd7967079e13a1c8.tar.gz chromium_src-2d3d1d19828e0ad8ef5218a2cd7967079e13a1c8.tar.bz2 |
[Sync] Propagate XMPP auth errors to SyncNotifierObservers
Detect XMPP auth errors and add new notifications to SingleLoginAttempt
and Login.
Replace PushClientObserver::OnNotificationStateChange with
OnNotifications{Enabled,Disabled} notifications.
Change SyncNotifierObserver similarly.
Handle InvalidationClient errors and propagate auth errors from that,
too.
Propagate XMPP auth errors all the way up to SyncManager. It will be
handled in a future CL.
BUG=38091
TEST=
Review URL: https://chromiumcodereview.appspot.com/10545170
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/notifier/p2p_notifier.h')
-rw-r--r-- | sync/notifier/p2p_notifier.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sync/notifier/p2p_notifier.h b/sync/notifier/p2p_notifier.h index 341bc8b..2243ff4 100644 --- a/sync/notifier/p2p_notifier.h +++ b/sync/notifier/p2p_notifier.h @@ -18,6 +18,7 @@ #include "base/threading/non_thread_safe.h" #include "jingle/notifier/listener/push_client_observer.h" #include "sync/internal_api/public/syncable/model_type.h" +#include "sync/notifier/notifications_disabled_reason.h" #include "sync/notifier/sync_notifier.h" namespace notifier { @@ -107,7 +108,9 @@ class P2PNotifier syncable::ModelTypeSet changed_types) OVERRIDE; // PushClientObserver implementation. - virtual void OnNotificationStateChange(bool notifications_enabled) OVERRIDE; + virtual void OnNotificationsEnabled() OVERRIDE; + virtual void OnNotificationsDisabled( + notifier::NotificationsDisabledReason reason) OVERRIDE; virtual void OnIncomingNotification( const notifier::Notification& notification) OVERRIDE; @@ -127,8 +130,6 @@ class P2PNotifier std::string unique_id_; // Whether we have called UpdateCredentials() yet. bool logged_in_; - // Whether |push_client_| has notified us that notifications are - // enabled. bool notifications_enabled_; // Which set of clients should be sent notifications. P2PNotificationTarget send_notification_target_; |