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

Side by Side Diff: sync/notifier/notifications_disabled_reason.cc

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "sync/notifier/notifications_disabled_reason.h"
6
7 #include "base/logging.h"
8
9 namespace sync_notifier {
10
11 const char* NotificationsDisabledReasonToString(
12 NotificationsDisabledReason reason) {
13 switch (reason) {
14 case NO_NOTIFICATION_ERROR:
15 return "NO_NOTIFICATION_ERROR";
16 case TRANSIENT_NOTIFICATION_ERROR:
17 return "TRANSIENT_NOTIFICATION_ERROR";
18 case NOTIFICATION_CREDENTIALS_REJECTED:
19 return "NOTIFICATION_CREDENTIALS_REJECTED";
20 default:
21 NOTREACHED();
22 return "UNKNOWN";
23 }
24 }
25
26 NotificationsDisabledReason FromNotifierReason(
27 notifier::NotificationsDisabledReason reason) {
28 switch (reason) {
29 case notifier::NO_NOTIFICATION_ERROR:
30 return NO_NOTIFICATION_ERROR;
31 case notifier::TRANSIENT_NOTIFICATION_ERROR:
32 return TRANSIENT_NOTIFICATION_ERROR;
33 case notifier::NOTIFICATION_CREDENTIALS_REJECTED:
34 return NOTIFICATION_CREDENTIALS_REJECTED;
35 default:
36 NOTREACHED();
37 return TRANSIENT_NOTIFICATION_ERROR;
38 }
39 }
40
41 } // sync_notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698