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

Unified Diff: sync/notifier/sync_notifier_observer.h

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: sync/notifier/sync_notifier_observer.h
diff --git a/sync/notifier/sync_notifier_observer.h b/sync/notifier/sync_notifier_observer.h
index 06855287477fb6e59df981f626bc06b569dd2fb4..4ca43dc27863964f14e2f96270cd74c677e5acdc 100644
--- a/sync/notifier/sync_notifier_observer.h
+++ b/sync/notifier/sync_notifier_observer.h
@@ -6,9 +6,8 @@
#define SYNC_NOTIFIER_SYNC_NOTIFIER_OBSERVER_H_
#pragma once
-#include <string>
-
#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/notifier/notifications_disabled_reason.h"
namespace sync_notifier {
@@ -21,10 +20,19 @@ enum IncomingNotificationSource {
class SyncNotifierObserver {
public:
+ // Called when notifications are enabled.
+ virtual void OnNotificationsEnabled() = 0;
+
+ // Called when notifications are disabled, with the reason in
+ // |reason|.
+ virtual void OnNotificationsDisabled(
+ NotificationsDisabledReason reason) = 0;
+
+ // Called when a notification is received. The per-type payloads
+ // are in |type_payloads| and the source is in |source|.
virtual void OnIncomingNotification(
const syncable::ModelTypePayloadMap& type_payloads,
IncomingNotificationSource source) = 0;
- virtual void OnNotificationStateChange(bool notifications_enabled) = 0;
protected:
virtual ~SyncNotifierObserver() {}

Powered by Google App Engine
This is Rietveld 408576698