Fix bug in load time stats.
[chromium-blink-merge.git] / sync / notifier / notifications_disabled_reason.h
blobb30573be2b52f23c571fc41eef68c4d9d3f345f6
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_
6 #define SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_
8 #include "jingle/notifier/listener/push_client_observer.h"
10 namespace syncer {
12 enum NotificationsDisabledReason {
13 // There is an underlying transient problem (e.g., network- or
14 // XMPP-related).
15 TRANSIENT_NOTIFICATION_ERROR,
16 DEFAULT_NOTIFICATION_ERROR = TRANSIENT_NOTIFICATION_ERROR,
17 // Our credentials have been rejected.
18 NOTIFICATION_CREDENTIALS_REJECTED,
19 // No error (useful as a default value or to avoid keeping a
20 // separate bool for notifications enabled/disabled).
21 NO_NOTIFICATION_ERROR
24 const char* NotificationsDisabledReasonToString(
25 NotificationsDisabledReason reason);
27 NotificationsDisabledReason FromNotifierReason(
28 notifier::NotificationsDisabledReason reason);
30 } // namespace syncer
32 #endif // SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_