summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/ash_switches.cc4
-rw-r--r--ash/ash_switches.h2
-rw-r--r--ash/system/network/tray_sms.cc3
-rw-r--r--ash/system/power/tray_power.cc3
-rw-r--r--chrome/app/generated_resources.grd8
-rw-r--r--chrome/browser/about_flags.cc8
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_notifications.cc4
-rw-r--r--chrome/browser/chromeos/locale_change_guard.cc3
-rw-r--r--chrome/browser/chromeos/network_message_observer.cc6
-rw-r--r--chrome/browser/chromeos/profile_startup.cc8
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc3
-rw-r--r--chrome/browser/task_manager/task_manager_notification_browsertest.cc6
-rw-r--r--chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc3
13 files changed, 36 insertions, 25 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc
index b34f135..523549e 100644
--- a/ash/ash_switches.cc
+++ b/ash/ash_switches.cc
@@ -17,8 +17,8 @@ const char kAshEnableOak[] = "ash-enable-oak";
// Enable extended desktop.
const char kAshExtendedDesktop[] = "ash-extended-desktop";
-// Use Ash notifications.
-const char kAshNotify[] = "ash-notify";
+// Disable using Ash notifications.
+const char kAshNotifyDisabled[] = "ash-notify-disabled";
// Enables the heads-up display for tracking touch points.
const char kAshTouchHud[] = "ash-touch-hud";
diff --git a/ash/ash_switches.h b/ash/ash_switches.h
index 2b4896e..8ebd479 100644
--- a/ash/ash_switches.h
+++ b/ash/ash_switches.h
@@ -19,7 +19,7 @@ namespace switches {
ASH_EXPORT extern const char kAppListShowAppsOnly[];
ASH_EXPORT extern const char kAshEnableOak[];
ASH_EXPORT extern const char kAshExtendedDesktop[];
-ASH_EXPORT extern const char kAshNotify[];
+ASH_EXPORT extern const char kAshNotifyDisabled[];
ASH_EXPORT extern const char kAshTouchHud[];
ASH_EXPORT extern const char kAshWindowAnimationsDisabled[];
ASH_EXPORT extern const char kAuraGoogleDialogFrames[];
diff --git a/ash/system/network/tray_sms.cc b/ash/system/network/tray_sms.cc
index 49fa1ee..073b65a 100644
--- a/ash/system/network/tray_sms.cc
+++ b/ash/system/network/tray_sms.cc
@@ -79,7 +79,8 @@ class TraySms::SmsObserver : public SmsObserverBase,
public chromeos::NetworkSmsHandler::Observer {
public:
explicit SmsObserver(TraySms* tray) : SmsObserverBase(tray) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshNotify))
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshNotifyDisabled))
return;
sms_handler_.reset(new chromeos::NetworkSmsHandler());
sms_handler_->AddObserver(this);
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 6a8d07c..b8c8e457 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -210,7 +210,8 @@ void TrayPower::OnPowerStatusChanged(const PowerSupplyStatus& status) {
if (notification_view_)
notification_view_->UpdatePowerStatus(status);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshNotify)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshNotifyDisabled)) {
if (UpdateNotificationState(status))
ShowNotificationView();
else if (notification_state_ == NOTIFICATION_NONE)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 38b94cf..86cfb6c 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5777,11 +5777,11 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_ASH_EXTENDED_DESKTOP_DESCRIPTION" desc="Description of the flag to enable extended desktop in ash.">
Enables extended desktop, which allows you to open a browser in secondary displays.
</message>
- <message name="IDS_FLAGS_ENABLE_ASH_NOTIFY_NAME" desc="Name of the flag to enable applist v2 in ash.">
- Enable Ash notifications.
+ <message name="IDS_FLAGS_DISABLE_ASH_NOTIFY_NAME" desc="Name of the flag to enable applist v2 in ash.">
+ Disable Ash notifications.
</message>
- <message name="IDS_FLAGS_ENABLE_ASH_NOTIFY_DESCRIPTION" desc="Description of the flag to enable ash notifications.">
- Enables ash status tray notifications instead of desktop system notifications.
+ <message name="IDS_FLAGS_DISABLE_ASH_NOTIFY_DESCRIPTION" desc="Description of the flag to disable ash notifications.">
+ Disables ash status tray notifications and enables desktop system notifications.
</message>
<message name="IDS_FLAGS_ENABLE_PINCH_SCALE_NAME" desc="Name of the flag to turn on experiental pinch to scale.">
Enable pinch scale.
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 233f487..3aeaff4 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -744,11 +744,11 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
},
{
- "ash-notify",
- IDS_FLAGS_ENABLE_ASH_NOTIFY_NAME,
- IDS_FLAGS_ENABLE_ASH_NOTIFY_DESCRIPTION,
+ "ash-notify-disabled",
+ IDS_FLAGS_DISABLE_ASH_NOTIFY_NAME,
+ IDS_FLAGS_DISABLE_ASH_NOTIFY_DESCRIPTION,
kOsAll,
- SINGLE_VALUE_TYPE(ash::switches::kAshNotify),
+ SINGLE_VALUE_TYPE(ash::switches::kAshNotifyDisabled),
},
{
"enable-pinch",
diff --git a/chrome/browser/chromeos/extensions/file_browser_notifications.cc b/chrome/browser/chromeos/extensions/file_browser_notifications.cc
index c0ac6ea..1674c3e 100644
--- a/chrome/browser/chromeos/extensions/file_browser_notifications.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_notifications.cc
@@ -134,8 +134,8 @@ class FileBrowserNotifications::NotificationMessage {
type_(type),
notification_id_(notification_id),
message_(message) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
const gfx::ImageSkia& icon =
*ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
GetIconId(type_));
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc
index 4ceb92b..aa861e2 100644
--- a/chrome/browser/chromeos/locale_change_guard.cc
+++ b/chrome/browser/chromeos/locale_change_guard.cc
@@ -173,7 +173,8 @@ void LocaleChangeGuard::Check() {
PrepareChangingLocale(from_locale, to_locale);
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
ash::Shell::GetInstance()->system_tray()->locale_observer()->
OnLocaleChanged(this, cur_locale, from_locale_, to_locale_);
return;
diff --git a/chrome/browser/chromeos/network_message_observer.cc b/chrome/browser/chromeos/network_message_observer.cc
index e659b77..317f019 100644
--- a/chrome/browser/chromeos/network_message_observer.cc
+++ b/chrome/browser/chromeos/network_message_observer.cc
@@ -68,9 +68,9 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
title_ = l10n_util::GetStringUTF16(IDS_NETWORK_OUT_OF_DATA_TITLE);
break;
}
- LOG_IF(ERROR, id.empty()) << "Unexpected error type: " << error_type;
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify) && !id.empty()) {
+ DCHECK(!id.empty());
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
system_notification_.reset(
new SystemNotification(profile, id, icon_id, title_));
}
diff --git a/chrome/browser/chromeos/profile_startup.cc b/chrome/browser/chromeos/profile_startup.cc
index 7081e16..5412f63 100644
--- a/chrome/browser/chromeos/profile_startup.cc
+++ b/chrome/browser/chromeos/profile_startup.cc
@@ -33,8 +33,8 @@ void ProfileStartup(Profile* profile, bool process_startup) {
if (process_startup) {
// These observers are singletons. They are never deleted but the pointers
// are kept in a statics so that they are not reported as leaks.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
static chromeos::LowBatteryObserver* low_battery_observer =
new chromeos::LowBatteryObserver(profile);
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(
@@ -50,8 +50,8 @@ void ProfileStartup(Profile* profile, bool process_startup) {
chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
AddUserActionObserver(network_message_observer);
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
static chromeos::SmsObserver* sms_observer =
new chromeos::SmsObserver(profile);
chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index c7014a7..0a89807 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -52,7 +52,8 @@
namespace {
bool IsAshNotifyEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify);
+ return !CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled);
}
} // namespace
diff --git a/chrome/browser/task_manager/task_manager_notification_browsertest.cc b/chrome/browser/task_manager/task_manager_notification_browsertest.cc
index f428ed3..233335f 100644
--- a/chrome/browser/task_manager/task_manager_notification_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_notification_browsertest.cc
@@ -19,6 +19,10 @@
#include "content/public/common/content_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if !defined(USE_ASH)
+// These tests do not apply on Ash where notifications do not instantiate
+// a new renderer.
+
class TaskManagerNotificationBrowserTest : public ExtensionBrowserTest {
public:
TaskManagerModel* model() const {
@@ -68,3 +72,5 @@ IN_PROC_BROWSER_TEST_F(TaskManagerNotificationBrowserTest,
notifications->CancelById(n2.notification_id());
TaskManagerBrowserTestUtil::WaitForResourceChange(2);
}
+
+#endif // !USE_ASH
diff --git a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
index bc9de45..85868aa 100644
--- a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
+++ b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
@@ -22,7 +22,8 @@
namespace {
bool IsAshNotifyEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify);
+ return !CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled);
}
} // namespace