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

Unified Diff: sync/notifier/sync_notifier_state.h

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix 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_state.h
diff --git a/sync/notifier/sync_notifier_state.h b/sync/notifier/sync_notifier_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6f100a8c685498ce4282e2bf32580b056bf0ba2
--- /dev/null
+++ b/sync/notifier/sync_notifier_state.h
@@ -0,0 +1,32 @@
+// 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_SYNC_NOTIFIER_STATE_H_
+#define SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_
+#pragma once
+
+#include "jingle/notifier/listener/push_client_observer.h"
+
+namespace sync_notifier {
+
+enum SyncNotifierState {
+ // Notifications can be sent and received freely.
+ NOTIFICATIONS_ON,
+ // No notifications can be sent or received. This is a transient state.
+ NOTIFICATIONS_OFF,
+ // Credentials were rejected, so no notifications can be sent or
+ // received. This state persists until a successful connection with
+ // updated auth credentials.
+ CREDENTIALS_REJECTED
+};
+
+const char* SyncNotifierStateToString(
+ SyncNotifierState sync_notifier_state);
+
+SyncNotifierState PushClientStateToSyncNotifierState(
+ notifier::PushClientState push_client_state);
+
+} // namespace sync_notifier
+
+#endif // SYNC_NOTIFIER_SYNC_NOTIFIER_STATE_H_

Powered by Google App Engine
This is Rietveld 408576698