summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authordewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 18:17:04 +0000
committerdewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 18:17:04 +0000
commit6cd63ea55c203355566e40eba3a79c92a66120b7 (patch)
tree16cd3a6560e074bed077083e5cbb0261f4cf18e5 /ui
parent121e41783b75db82564b7e1d4749aaac9919c26f (diff)
downloadchromium_src-6cd63ea55c203355566e40eba3a79c92a66120b7.zip
chromium_src-6cd63ea55c203355566e40eba3a79c92a66120b7.tar.gz
chromium_src-6cd63ea55c203355566e40eba3a79c92a66120b7.tar.bz2
Enable rich notifications by default.
This fixes many tests that were relying directly on BalloonCollectionNotificationManager, since that is now defunct on platforms with ENABLE_MESSAGE_CENTER. It also disables some tests that no longer make sense. BUG=169538 Review URL: https://chromiumcodereview.appspot.com/12472007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/message_center/message_center_util.cc6
-rw-r--r--ui/message_center/views/notification_view.cc4
2 files changed, 6 insertions, 4 deletions
diff --git a/ui/message_center/message_center_util.cc b/ui/message_center/message_center_util.cc
index 90f7f47..3b1f1e7 100644
--- a/ui/message_center/message_center_util.cc
+++ b/ui/message_center/message_center_util.cc
@@ -9,9 +9,11 @@
namespace message_center {
+// TODO(dimich): remove this function and the kEnableRichNotifications flag
+// when a time period in Canary indicates the new notifications are acceptable
+// for default behavior.
bool IsRichNotificationEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableRichNotifications);
+ return true;
}
} // namespace message_center
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index c27e74a..e4b2cca 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -13,6 +13,7 @@
#include "ui/gfx/size.h"
#include "ui/message_center/message_center_constants.h"
#include "ui/message_center/message_center_switches.h"
+#include "ui/message_center/message_center_util.h"
#include "ui/message_center/notification.h"
#include "ui/message_center/notification_types.h"
#include "ui/message_center/views/message_simple_view.h"
@@ -202,8 +203,7 @@ MessageView* NotificationView::Create(
// one of the use-the-new-style flags are set. This preserves the appearance
// of notifications created by existing code that uses webkitNotifications.
if (notification.type() == NOTIFICATION_TYPE_SIMPLE &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
- message_center::switches::kEnableRichNotifications) &&
+ !IsRichNotificationEnabled() &&
!CommandLine::ForCurrentProcess()->HasSwitch(
message_center::switches::kEnableNewSimpleNotifications)) {
return new MessageSimpleView(list_delegate, notification);