OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/notification_method.h" | 5 #include "chrome/browser/sync/notification_method.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace browser_sync { | 9 namespace browser_sync { |
10 | 10 |
| 11 // TODO(akalin): Eventually change this to NOTIFICATION_NEW. |
11 const NotificationMethod kDefaultNotificationMethod = | 12 const NotificationMethod kDefaultNotificationMethod = |
12 NOTIFICATION_SERVER; | 13 NOTIFICATION_TRANSITIONAL; |
13 | 14 |
14 std::string NotificationMethodToString( | 15 std::string NotificationMethodToString( |
15 NotificationMethod notification_method) { | 16 NotificationMethod notification_method) { |
16 switch (notification_method) { | 17 switch (notification_method) { |
17 case NOTIFICATION_LEGACY: | 18 case NOTIFICATION_LEGACY: |
18 return "NOTIFICATION_LEGACY"; | 19 return "NOTIFICATION_LEGACY"; |
19 break; | 20 break; |
20 case NOTIFICATION_TRANSITIONAL: | 21 case NOTIFICATION_TRANSITIONAL: |
21 return "NOTIFICATION_TRANSITIONAL"; | 22 return "NOTIFICATION_TRANSITIONAL"; |
22 break; | 23 break; |
(...skipping 21 matching lines...) Expand all Loading... |
44 } else if (str == "server") { | 45 } else if (str == "server") { |
45 return NOTIFICATION_SERVER; | 46 return NOTIFICATION_SERVER; |
46 } | 47 } |
47 LOG(WARNING) << "Unknown notification method \"" << str | 48 LOG(WARNING) << "Unknown notification method \"" << str |
48 << "\"; using method " | 49 << "\"; using method " |
49 << NotificationMethodToString(kDefaultNotificationMethod); | 50 << NotificationMethodToString(kDefaultNotificationMethod); |
50 return kDefaultNotificationMethod; | 51 return kDefaultNotificationMethod; |
51 } | 52 } |
52 | 53 |
53 } // namespace browser_sync | 54 } // namespace browser_sync |
OLD | NEW |