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

Unified Diff: sync/notifier/notifications_disabled_reason.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/notifications_disabled_reason.h
diff --git a/sync/notifier/notifications_disabled_reason.h b/sync/notifier/notifications_disabled_reason.h
new file mode 100644
index 0000000000000000000000000000000000000000..75239cdf1bdedade8fa975a72edfc75c2f5963ff
--- /dev/null
+++ b/sync/notifier/notifications_disabled_reason.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_
+#define SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_
+#pragma once
+
+#include "jingle/notifier/listener/push_client_observer.h"
+
+namespace sync_notifier {
+
+enum NotificationsDisabledReason {
+ // There is an underlying transient problem (e.g., network- or
+ // XMPP-related).
+ TRANSIENT_NOTIFICATION_ERROR,
+ DEFAULT_NOTIFICATION_ERROR = TRANSIENT_NOTIFICATION_ERROR,
+ // Our credentials have been rejected.
+ NOTIFICATION_CREDENTIALS_REJECTED,
+ // No error (useful as a default value or to avoid keeping a
+ // separate bool for notifications enabled/disabled).
+ NO_NOTIFICATION_ERROR
+};
+
+const char* NotificationsDisabledReasonToString(
+ NotificationsDisabledReason reason);
+
+NotificationsDisabledReason FromNotifierReason(
+ notifier::NotificationsDisabledReason reason);
+
+} // namespace sync_notifier
+
+#endif // SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_

Powered by Google App Engine
This is Rietveld 408576698