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

Unified Diff: sync/notifier/invalidator_state.h

Issue 308413002: Revert of Move some sync/notifier to components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « sync/notifier/invalidator_registrar_unittest.cc ('k') | sync/notifier/invalidator_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidator_state.h
diff --git a/sync/notifier/invalidator_state.h b/sync/notifier/invalidator_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb4b3d615555eb81f1a9a94f3d1e5b57b9448a89
--- /dev/null
+++ b/sync/notifier/invalidator_state.h
@@ -0,0 +1,38 @@
+// Copyright 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_INVALIDATOR_STATE_H_
+#define SYNC_NOTIFIER_INVALIDATOR_STATE_H_
+
+#include "jingle/notifier/listener/push_client_observer.h"
+#include "sync/base/sync_export.h"
+
+namespace syncer {
+
+enum InvalidatorState {
+ // Failure states
+ // --------------
+ // There is an underlying transient problem (e.g., network- or
+ // XMPP-related).
+ TRANSIENT_INVALIDATION_ERROR,
+ DEFAULT_INVALIDATION_ERROR = TRANSIENT_INVALIDATION_ERROR,
+ // Our credentials have been rejected.
+ INVALIDATION_CREDENTIALS_REJECTED,
+
+ // Invalidations are fully working.
+ INVALIDATIONS_ENABLED
+};
+
+SYNC_EXPORT const char* InvalidatorStateToString(InvalidatorState state);
+
+InvalidatorState FromNotifierReason(
+ notifier::NotificationsDisabledReason reason);
+
+// Should not be called when |state| == INVALIDATIONS_ENABLED.
+SYNC_EXPORT_PRIVATE notifier::NotificationsDisabledReason
+ ToNotifierReasonForTest(InvalidatorState state);
+
+} // namespace syncer
+
+#endif // SYNC_NOTIFIER_INVALIDATOR_STATE_H_
« no previous file with comments | « sync/notifier/invalidator_registrar_unittest.cc ('k') | sync/notifier/invalidator_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698