Chromium Code Reviews| Index: chrome/browser/notifications/notification_ui_manager.cc |
| diff --git a/chrome/browser/notifications/notification_ui_manager.cc b/chrome/browser/notifications/notification_ui_manager.cc |
| index af48cb3a45434097785e1d0b2af84cc0a81ae1e5..b4b7f883662ab18a81f9163e82c857b4c59384a0 100644 |
| --- a/chrome/browser/notifications/notification_ui_manager.cc |
| +++ b/chrome/browser/notifications/notification_ui_manager.cc |
| @@ -6,12 +6,15 @@ |
| #include "base/command_line.h" |
| #include "chrome/browser/notifications/balloon_notification_ui_manager.h" |
| -#include "chrome/browser/notifications/message_center_notification_manager.h" |
| #include "chrome/common/chrome_switches.h" |
| +#if defined(ENABLE_MESSAGE_CENTER) |
| +#include "chrome/browser/notifications/message_center_notification_manager.h" |
| +#endif |
| + |
| // static |
| bool NotificationUIManager::DelegatesToMessageCenter() { |
| -#if defined(OS_WIN) || defined(OS_CHROMEOS) |
| +#if defined(ENABLE_MESSAGE_CENTER) |
| return CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kEnableRichNotifications); |
| #else |
| @@ -22,14 +25,14 @@ bool NotificationUIManager::DelegatesToMessageCenter() { |
| #if !defined(OS_MACOSX) |
| // static |
| NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { |
| - if (DelegatesToMessageCenter()) { |
| +#if defined(ENABLE_MESSAGE_CENTER) |
|
stevenjb
2013/01/07 23:08:05
This #if isn't really necessary since DelegatesToM
dewittj
2013/01/08 23:50:01
This #if is required as the code is currently writ
stevenjb
2013/01/08 23:59:50
Ah, of course, Duh.
|
| + if (DelegatesToMessageCenter()) |
| return new MessageCenterNotificationManager(); |
| - } else { |
| - BalloonNotificationUIManager* balloon_manager = |
| - new BalloonNotificationUIManager(local_state); |
| - balloon_manager->SetBalloonCollection(BalloonCollection::Create()); |
| - return balloon_manager; |
| - } |
| +#endif |
| + BalloonNotificationUIManager* balloon_manager = |
| + new BalloonNotificationUIManager(local_state); |
| + balloon_manager->SetBalloonCollection(BalloonCollection::Create()); |
| + return balloon_manager; |
| } |
| #endif |