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

Unified Diff: chrome/browser/notifications/notification_ui_manager.cc

Issue 11791004: Rearrange gyp files for Message Center (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: More idiomatic gyp usage. Created 7 years, 12 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 | « build/common.gypi ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « build/common.gypi ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698