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/push_client_channel.cc | |
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/push_client_channel.cc')
-rw-r--r-- | sync/notifier/push_client_channel.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sync/notifier/push_client_channel.cc b/sync/notifier/push_client_channel.cc index cfd3129..4ef60bc 100644 --- a/sync/notifier/push_client_channel.cc +++ b/sync/notifier/push_client_channel.cc @@ -62,12 +62,20 @@ void PushClientChannel::SetSystemResources( // Do nothing. } -void PushClientChannel::OnNotificationStateChange( - bool notifications_enabled) { +void PushClientChannel::OnNotificationsEnabled() { for (NetworkStatusReceiverList::const_iterator it = network_status_receivers_.begin(); it != network_status_receivers_.end(); ++it) { - (*it)->Run(notifications_enabled); + (*it)->Run(true); + } +} + +void PushClientChannel::OnNotificationsDisabled( + notifier::NotificationsDisabledReason reason) { + for (NetworkStatusReceiverList::const_iterator it = + network_status_receivers_.begin(); + it != network_status_receivers_.end(); ++it) { + (*it)->Run(false); } } |